Re: Python doesn't understand %userprofile%

2008-06-11 Thread Mike Driscoll
On Jun 11, 1:58 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > >In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > >bites back with "cannot find the path specified" Since my script has > >to run on machines where the username is unspecified I need a fix.

Re: Python doesn't understand %userprofile%

2008-06-11 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >In xp when I try os.path.getmtime("%userprofile/dir/file%") Python >bites back with "cannot find the path specified" Since my script has >to run on machines where the username is unspecified I need a fix. For the record, the %PERCENT% syntax for looking up an environmen

Re: Python doesn't understand %userprofile%

2008-06-10 Thread castironpi
On Jun 10, 6:51 pm, TheSaint <[EMAIL PROTECTED]> wrote: > On 00:11, mercoledì 11 giugno 2008 Tim Golden wrote: > > > "%USERPROFILE%/dir/file". > > os.environ('USERPROFILE') should return an info regarding that environment > variable. > I guess that, not yet tried. > -- > Mailsweeper Home :http://it

Re: Python doesn't understand %userprofile%

2008-06-10 Thread TheSaint
On 00:11, mercoledì 11 giugno 2008 Tim Golden wrote: > "%USERPROFILE%/dir/file". os.environ('USERPROFILE') should return an info regarding that environment variable. I guess that, not yet tried. -- Mailsweeper Home : http://it.geocities.com/call_me_not_now/index.html -- http://mail.python.org/ma

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Tim Golden
[EMAIL PROTECTED] wrote: On Jun 10, 2:09 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: In xp when I try os.path.getmtime("%userprofile/dir/file%") Python bites back with "cannot find the path specified" Since my script has to run on machines where the username is unspecif

Re: Python doesn't understand %userprofile%

2008-06-10 Thread [EMAIL PROTECTED]
On Jun 10, 2:09 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > > bites back with "cannot find the path specified" Since my script has > > to run on machines where the username is unspecified I need a fi

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > bites back with "cannot find the path specified" Since my script has > to run on machines where the username is unspecified I need a fix. > Thanks in advance. >>> os.path.expanduser("~/dir/file") 'C:\\

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Mike Driscoll
On Jun 10, 11:11 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > > bites back with "cannot find the path specified" Since my script has > > to run on machines where the username is unspecified I need a fix

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Lie
On Jun 10, 11:11 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > > bites back with "cannot find the path specified" Since my script has > > to run on machines where the username is unspecified I need a fix

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Tim Golden
[EMAIL PROTECTED] wrote: In xp when I try os.path.getmtime("%userprofile/dir/file%") Python bites back with "cannot find the path specified" Since my script has to run on machines where the username is unspecified I need a fix. Well I can see a few problems here. First is that putting percent

Re: Python doesn't understand %userprofile%

2008-06-10 Thread bsagert
On Jun 10, 8:56 am, [EMAIL PROTECTED] wrote: > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > bites back with "cannot find the path specified" Since my script has > to run on machines where the username is unspecified I need a fix. > Thanks in advance. oops that should be os.

Python doesn't understand %userprofile%

2008-06-10 Thread bsagert
In xp when I try os.path.getmtime("%userprofile/dir/file%") Python bites back with "cannot find the path specified" Since my script has to run on machines where the username is unspecified I need a fix. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list