PyRun_SimpleString problem.
Arinte
shouldbe at message.com
Wed Nov 10 11:16:19 EST 1999
I am trying to run a python file from a dll. When I run the file w/
PyRun_AnyFile it works fine. But, when I try to run the code line by line
w/ PyRun_SimpleString I get this error on function definitions.
def bottle(n):
File "<string>", line 1
def bottle(n):
^
SyntaxError: unexpected EOF while parsing
if n == 0: return "no more bottles of beer"
File "<string>", line 1
if n == 0: return "no more bottles of beer"
Can I run files line by line if they define functions? If so, how?
Thanks
More information about the Python-list
mailing list