问题 Suppose I have a module foo.py and a package foo/ . If I call import foo which one will be loaded? How can I specify I wand to load the module, or the package? 回答1: I believe the package will always get loaded. You can't work around this, as far as I know. So change either the package or the module name. Docs: http://docs.python.org/tutorial/modules.html#the-module-search-path 回答2: Actually, it is possible (this code is not well tested, but seems to work). File foo.py print "foo module loaded