Author clikkeb
Recipients asvetlov, clikkeb, roger.serwy, terry.reedy
Date 2012-04-15.20:42:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334522543.2.0.558118494262.issue14576@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-04-15 20:42:23clikkebsetrecipients: + clikkeb, terry.reedy, roger.serwy, asvetlov
2012-04-15 20:42:23clikkebsetmessageid: <1334522543.2.0.558118494262.issue14576@psf.upfronthosting.co.za>
2012-04-15 20:42:22clikkeblinkissue14576 messages
2012-04-15 20:42:22clikkebcreate