Embedding question (doing Python from C)
Gordon McMillan
gmcm at hypernet.com
Thu Sep 9 14:01:40 EDT 1999
Randy Heiland writes:
> I have a C++ server executing Python scripts using just
> PyRun_SimpleString and it works great -- mostly. However, it
> doesn't handle more complicated Python commands/constructs, e.g., a
> 'for' loop. Can someone offer advice?
What seems to be the problem? PyRun_SimpleString can't hack Windows
line endings (should just be '\n'), and requires a null-terminated
string, but said SimpleString's contents can be arbitrarily complex
Python code.
- Gordon
More information about the Python-list
mailing list