Python doesn't understand %userprofile%

bsagert at gmail.com bsagert at gmail.com
Tue Jun 10 12:00:39 EDT 2008


On Jun 10, 8:56 am, bsag... at gmail.com 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.path.getmtime("%userprofile%/dir/file")



More information about the Python-list mailing list