Like this ?
http://aspn.activestate.com/ASPN/Mail/Message/python-list/1304518 Philippe vduber6er wrote: > I have a C program that calls my python script by > > exec_pycode(code); > > code = "import CheckFasta\nCheckFasta.CheckFasta (\"sampledata.txt\", > %d)\n", PyNum); > > CheckFasta.py is my python script with a def CheckFasta in it that > returns a string. > > Is there a way for my C code to get the return value from CheckFasta? > > Example: > If CheckFasta returns "hello world" > > can I somehow do something like > > returnstring = exec_pycode(code); > > where returnstring will contain "hello world" after the line above? > > Thanks -- http://mail.python.org/mailman/listinfo/python-list