uptime for Win XP?

Esmail Bonakdarian ebonakDUH at hotmail.com
Mon Dec 13 03:09:35 CET 2004


Fredrik Lundh wrote:

> import os, re
> 
> def uptime():
>     return re.search(
>         "System Up Time:\s*(.+)", os.popen("systeminfo").read()
>         ).group(1)
> 
> print uptime()

Thanks, I'm learning a lot :-)

Esmail



More information about the Python-list mailing list