PyRun_String
Stephen Hansen
stephen at cerebralmaelstrom.com
Thu Jun 1 08:09:44 EDT 2000
Heh, nevermind. Found the answer in the demo directory where :)
Note to self: Do Search In Files *.c* for examples in before asking
questions :)
--S
Stephen Hansen <stephen at cerebralmaelstrom.com> wrote in message
news:%FpZ4.31001$WS3.359957 at typhoon.we.rr.com...
> 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