I prefer:

import os
os.environ['HOME']

but I have no strong argument for that bias other than I sometimes use different environment variables and I standardized on the call.

Daniel

On Mar 19, 2006, at 3:00 AM, [EMAIL PROTECTED] wrote:

From: "Stewart Midwinter" <[EMAIL PROTECTED]>

Date: March 18, 2006 4:40:06 PM PST

To: "Kent Quirk" <[EMAIL PROTECTED]>

Cc: pythonmac-sig@python.org

Subject: Re: [Pythonmac-SIG] Question on user's directory ( ~ )



On 3/18/06, Kent Quirk <[EMAIL PROTECTED]> wrote:

Try this:


import os.path

os.path.expanduser('~')


you da man!     That works perfectly.     I mostly use Python on

WinXP, so I haven't been familiar with that function up until now.


thanks again

S


Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to