[Twisted-Python] Newbie question: How to reference the "__main__"

Iap, Singuan iap_yeh at abit.com.tw
Fri Oct 1 05:40:09 EDT 2004


Hi,

I starts my daemon (server.py) by
$twistd -noy server.py


In server.py
----------------------------------------
config=Configuration()


In somewhere.py,
----------------------------------------
import __main__
config=__main__.config ### Don't work, since __main__ is twistd, not
server.py
## how do I get the config in server.py?

Thanks.

Iap, Singuan







More information about the Twisted-Python mailing list