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 fix.
> > Thanks in advance.
> >>> os.path.expanduser("~/dir/file")
>
> 'C:\\Documents and Settings\\Duncan/dir/file'"~" appears to look first at the HOME environment variable. That is not necessarily the same as "USERPROFILE". On my machine it is not. -- http://mail.python.org/mailman/listinfo/python-list
