PyRun_String

Stephen Hansen stephen at cerebralmaelstrom.com
Thu Jun 1 05:03:55 EDT 2000


    What do I enter into PyRun_String's "globals" and "locals" dictionary
position if I want it to be in __main__?

    E.g: I'm embedding Python into a program. I call in prior places
PyModule_Import("languages"), and execute an arbitrary string or two
(namely, atm, PyRun_SimpleString("sys.path.append('a-path')"))

    I want to call "languages.Translate()" from __main__...

Thanks,

--S





More information about the Python-list mailing list