Re: import foo vs. python -m foo

2008-10-28 Thread Asun Friere
On Oct 29, 7:35 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > It probably contains buggy code inside "if __name__ == '__main__': ...". Or the code contains a run-time error? -- http://mail.python.org/mailman/listinfo/python-list

Re: import foo vs. python -m foo

2008-10-28 Thread Hrvoje Niksic
Simon Bierbaum <[EMAIL PROTECTED]> writes: > 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? My copy of the man page states: -m modul

import foo vs. python -m foo

2008-10-28 Thread Simon Bierbaum
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 succeed