En Mon, 09 Apr 2007 14:56:03 -0300, Pradnyesh Sawant <[EMAIL PROTECTED]> escribió:
> Thanks for the pointer to use /proc/stat > However, that does not answer my other question about string slicing > Any pointers in that direction would be helpful... > >> > top = os.popen("top -n 1") >> > rd = top.read().split("\n") >> > splt = rd[2].split() >> > # cpu = splt[2][:-4] # why ain't this working ??? >> > cpu = splt[2] >> > print "cpu usage: %s, %s" % (cpu, type(cpu)) Print rd[2] above and see how it is formatted. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list