Hi all,

I write a small script

status = os.popen('top').readlines()
print status

It calls the command line "top" and will print out the status.
But I have to press the keyboard "q" to quit "top", then the status will be 
printed, otherwise it just stands by with blank.

Question is. Do you know how to give "q" into my python script so that "top" is 
automatically quit immediately or maybe after 1s (for gathering information)

Sorry the question is weird.



      
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to