Re: two embedded problem. one maybe is python bug.

2006-08-03 Thread John McMonagle
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")

two embedded problem. one maybe is python bug.

2006-08-03 Thread yy x
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