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
Hey, all.Now I wanna to transfer a object to other computer, Maybe I could serialize the object to a file by pickle moudle, then send the file and get it from the file.But I think the efficency is awful, because the disk io is very slow.
Someone could do me a favor to give me some idea?
hi, all:
for example, the following class:
class test: def funca(self): print "in funca"
def funcb(self): print "in funcb"
t = test()
t.funca()
In the plain way, i will excute the funca by the code "t.funca() ",
but if i wanna to excute the funca by "t" and string "f
hi,all.
I have remarked the statement of question with blue color in the following funcition, Counld someone answer me?
thanks
PyObject *PyObject_CallFunction(PyObject *callable, char *format, ...){ va_list va; PyObject *args, *retval;
if (callable == NULL) return null_error();
if (form