On Fri, 2006-08-04 at 11:10 +0800, yy x wrote:
> hi,all,
>
>
>
> the content of a.py :
> #coding:gb2312
> #/usr/local/bin/python
> import random
> print random.randint(0,10)
>
> the c program:
> #include
> int main()
> {
> Py_Initialize();
> PyRun_SimpleString("import sys")
hi,all,
the content of a.py :
#coding:gb2312#/usr/local/bin/pythonimport randomprint random.randint(0,10)
the c program:
#include int main(){ Py_Initialize(); PyRun_SimpleString("import sys"); PyRun_SimpleString("sys.path.append('.')");
PyRun_SimpleString("impo