py script modify it's Modified Time?

kyosohma at gmail.com kyosohma at gmail.com
Wed Apr 11 09:33:57 EDT 2007


On Apr 11, 6:14 am, "est" <electronix... at gmail.com> wrote:
> I guess os.stat() could retrieve information about ctime, mtime of a
> path, but how can I change them? Is it possible to make it work both
> under Win32 and Linux?
>
> P.S. How to get the current running python?  (Like
> WScript.ScriptFullName in vbscript)

I am not sure if you can change a creation time of a file on NT, but
the rest sounds possible; according to this post anyway:

http://mail.python.org/pipermail/python-list/2001-August/100214.html

It mentions using the win32 modules, which can be found here:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/pywin32/win32_modules.html

As to your last question of finding the current running python, use
the sys module's "executable" method, like so: sys.executable

Mike




More information about the Python-list mailing list