uptime for Win XP?

Greg Krohn greg at invalid.invalid
Sun Dec 12 00:41:52 CET 2004

Tom Wesley wrote:
> Esmail Bonakdarian wrote:
>> Hi,
>> Is there a way to display how long a Win XP system has been up?
>> Somewhat analogous to the *nix uptime command.
>> Thanks,
>> Esmail
> I believe that "uptime" works from the console, but don't have a machine 
> to check it with...

Doesn't work for me, but if you have win32all installed, you can get it 
from Python:

 >>> import win32api
 >>> print "Uptime:", win32api.GetTickCount(), "Milliseconds"
Uptime: 148699875 Milliseconds


More information about the Python-list mailing list