[Pythonmac-SIG] Pythonmac-SIG Digest, Vol 35, Issue 36

Daniel Lord daniel at brightfire.com
Sun Mar 19 21:15:48 CET 2006


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, pythonmac-sig-request at python.org wrote:

> From: "Stewart Midwinter" <stewart.midwinter at gmail.com>
> Date: March 18, 2006 4:40:06 PM PST
> To: "Kent Quirk" <kquirk at solidworks.com>
> Cc: pythonmac-sig at python.org
> Subject: Re: [Pythonmac-SIG] Question on user's directory ( ~ )
>
>
> On 3/18/06, Kent Quirk <kquirk at solidworks.com> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20060319/133db34b/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20060319/133db34b/attachment.pgp 


More information about the Pythonmac-SIG mailing list