python中写shell,亲测可用,转自stackoverflow To run a bash script, copy from stackoverflow def run_script(script, stdin=None): """Returns (stdout, stderr), raises error on non-zero return code""" import subprocess # Note: by using a li…
一.环境:Windows XP + Python3.2 1. dll对应的源文件(m.cpp): #include <stdio.h> extern "C" { _declspec(dllexport) int add(int a, int b) { return a+b; } _declspec(dllexport) void print_sum(unsigned long ulNum) { ) { printf("The ulNum is : %u\n&quo…