Calling functions in main script from a module
Tim Peters
tim_one at email.msn.com
Wed Sep 22 01:42:21 EDT 1999
[James Bursa]
> Is it possible to call a function in the main script (the one
> passed on the Python command line) from a module function?
>
> I've attempted to use something like __main__.function(), but this doesn't
> work. ...
What does "doesn't work" mean? Works for me. Perhaps you didn't import
__main__ in the other module first; without code and a traceback, nobody can
guess.
except-for-bots<wink>-ly y'rs - tim
More information about the Python-list
mailing list