Import a module without executing it?
Andy Gross
andy at andygross.org
Tue Dec 7 16:29:00 EST 2004
More information about the Python-list mailing list
Tue Dec 7 16:29:00 EST 2004
- Previous message (by thread): Import a module without executing it?
- Next message (by thread): Import a module without executing it?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Dec 7, 2004, at 4:20 PM, Steven Bethard wrote: > > If you have source control over this file, you could write it with the > more standard idiom... I should have mentioned this first. If you're just trying to avoid existing top-level code from being executed, use the if __name__ == "__main__" idiom.
- Previous message (by thread): Import a module without executing it?
- Next message (by thread): Import a module without executing it?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list