Message120053
Note also that site.py runs twice when used with -m: once implicitly during interpreter startup, and a second time as the main module. Due to the way the interpreter starts up and figures out sys.path, it is possible for the implicit import to pick up the correct version, but for the explicit invocation to find an old version.
With my site.py patched to include a "print __name__" line, I get the following:
$ ./python -m site
site
__main__
sys.path = [
<details cut>
]
USER_BASE: <details cut> (exists)
USER_SITE: <details cut> (exists)
ENABLE_USER_SITE: True
The fact that you're only seeing one printout suggests to me that this is exactly the problem you're running into. The easiest way to confirm that is to run "python Lib/site.py" explicitly rather than via -m. That way you aren't relying on the second import working correctly (and I'm assuming you want to run this because you have doubts as to the correctness of the contents of your sys.path) |
|
Date |
User |
Action |
Args |
2010-10-31 15:15:16 | ncoghlan | set | recipients:
+ ncoghlan, eric.araujo, doughellmann |
2010-10-31 15:15:16 | ncoghlan | set | messageid: <1288538116.72.0.874687485494.issue10263@psf.upfronthosting.co.za> |
2010-10-31 15:15:15 | ncoghlan | link | issue10263 messages |
2010-10-31 15:15:14 | ncoghlan | create | |
|