This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author weizhao
Recipients weizhao
Date 2013-09-21.15:57:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAL6+1BmD=sqS0SsD89kJ8wfOyWL1=2iFKVGEcHkxxXpNx8ysGA@mail.gmail.com>
In-reply-to <1379777943.19.0.474410652516.issue19062@psf.upfronthosting.co.za>
Content
i am working under non-administrator account .
in fact os.path.expanduser('~') works well when as admin run .
but just got a %userprofile% when as standard account .

On Sat, Sep 21, 2013 at 11:39 PM, patrick wai <report@bugs.python.org>wrote:

>
> New submission from patrick wai:
>
> #file
> idlelib/configHandler.py
>
> #code
> userDir = os.path.expanduser('~')
>
> #os
> windows 7 sp1
>
> it doesnt get final userdir path. it doesnt work correctly for userdir .
> this cause python3.3 IDLE GUI can not be opened on my pc .
> as per the docment says as follows:
>
> help(os.path.expanduser)
> Help on function expanduser in module ntpath:
>
> expanduser(path)
>     Expand ~ and ~user constructs.
>
>     If user or $HOME is unknown, do nothing.
>
> help(os.path.expandvars)
> Help on function expandvars in module ntpath:
>
> expandvars(path)
>     Expand shell variables of the forms $var, ${var} and %var%.
>
>     Unknown variables are left unchanged.
>
> the right code may be:
>
> userDir = os.path.expandvars(os.path.expanduser('~'))
>
> ----------
> components: IDLE
> messages: 198210
> nosy: weizhao
> priority: normal
> severity: normal
> status: open
> title: problems with pyshell to get userdir
> type: behavior
> versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4,
> Python 3.5
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue19062>
> _______________________________________
>
History
Date User Action Args
2013-09-21 15:57:47weizhaosetrecipients: + weizhao
2013-09-21 15:57:47weizhaolinkissue19062 messages
2013-09-21 15:57:47weizhaocreate