Ned Deily <n...@acm.org> added the comment:

Nick is the authority on -m so perhaps he can confirm this but I believe the 
execution of -m is carried out by the runpy standard library module and the 
runpy module essentially goes through the process of finding a module from 
scratch by searching through the modules in sys.path, thus bypassing the 
altered sys.path which the setuptools/Distribute site module "bootstrapped" and 
removed itself from.  So runpy will always find the setuptools/Distribute site 
module first since it is first on sys.path (until it executes and removes 
itself from sys.path).  It seems you've found one case where the sys.path 
manipulations of setuptools/Distributes make a difference: when trying to run 
site itself.  You can see which site module is found by runpy by trying:
  import runpy
  runpy.run_module("site")

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10263>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to