import foo vs. python -m foo

Simon Bierbaum bierbaum at vierfalt.com
Tue Oct 28 15:22:34 EDT 2008


Hi all,

what is the difference between saying "import foo" in an interactive  
prompt and starting one using "python -m foo"? The -m switch is not  
covered in the man page, is it even officially supported? I'm asking  
because one of my modules fails on import in the second version but  
succeeds in the first.

Thanks, Simon




More information about the Python-list mailing list