Esmail Bonakdarian wrote: > Is there a way to display how long a Win XP system has been up? > Somewhat analogous to the *nix uptime command.
ugly, somewhat slow, and possibly locale dependent: import os, re def uptime(): return re.search( "System Up Time:\s*(.+)", os.popen("systeminfo").read() ).group(1) print uptime() </F> -- http://mail.python.org/mailman/listinfo/python-list