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 module-name Searches sys.path for the named module and runs the corresponding .py file as a script. > I'm asking because one of my modules fails on import in the second > version but succeeds in the first. It probably contains buggy code inside "if __name__ == '__main__': ...". -- http://mail.python.org/mailman/listinfo/python-list