How to tell if I'm being run from a shell or a module
Jeff
jeffober at gmail.com
Thu Feb 14 12:27:09 EST 2008
Previous message (by thread):
How to tell if I'm being run from a shell or a module
Next message (by thread):
How to tell if I'm being run from a shell or a module
Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Conventionally, you use: if __name__ == '__main__': # do something as a script
Previous message (by thread):
How to tell if I'm being run from a shell or a module
Next message (by thread):
How to tell if I'm being run from a shell or a module
Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-list mailing list