Message158367
Thanks for your answer.
Trying to understand how IDLE uses HOMEPATH and USERPROFILE Windows
variables, I have found the following information:
1) it seems that when executed via Windows command prompt (cmd.exe),
os.path.expanduser refers to USERPROFILE to determine the user's
home directory;
2) analizing the stack traces of the first calls to
IdleConf.GetUserCfgDir, you can see that GetUserCfgDir (which
calls expanduser) is called three times during IDLE startup:
the first two times it refers to USERPROFILE, the third (called
via run.py, probably after starting a subprocess) it refers to
the combination of HOMEDRIVE and HOMEPATH. (???)
3) when you start IDLE using pythonw, sys.stderr.write(warn) seems
to raise an AttributeError exception, which is unhandled. This
causes IDLE to stop running when you either start IDLE that way
and the user's home directory is unreachable.
Due to the Python's tricky behaviour in determining the Windows
user's home directory, my opinion would be to consider if it is
worth to go further with this discussion or if it could produce
a benefit to IDLE. For sure, it gave me a little bit of headache.
clikkeb. |
|
Date |
User |
Action |
Args |
2012-04-15 20:42:23 | clikkeb | set | recipients:
+ clikkeb, terry.reedy, roger.serwy, asvetlov |
2012-04-15 20:42:23 | clikkeb | set | messageid: <1334522543.2.0.558118494262.issue14576@psf.upfronthosting.co.za> |
2012-04-15 20:42:22 | clikkeb | link | issue14576 messages |
2012-04-15 20:42:22 | clikkeb | create | |
|