embedded python: "integer is required", when calling PyRun_SimpleString

"Martin v. Löwis" martin at v.loewis.de
Sun Mar 9 12:11:57 EST 2003


Heiko Köhler wrote:
> Im writting a QT and Scintilla based text editor with an embedded python
> interpreter. Sometimes when I call PyRun_SimpleString( "any_string") python
> aborts with message: "an integer is required". But when I call
> PyRun_SimpleString("pass"); PyRun_SimpleString("any_string") it works.

I guess the implied question is: Why does that happen?

This is difficult to tell: it depends on the actual value of 
"any_string". Most likely, that contains a function call which requires 
integers.

Regards,
Martin






More information about the Python-list mailing list