[Tutor] how to get response from os.system()

shawn bright nephish at gmail.com
Sun Mar 16 17:44:02 CET 2008


Lo there all,

 I am needing to get a response back from a system command.
 i can do this:

 os.system('mailq | wc -l")

 if i do this in the terminal  mailq | wc -l   ,   it will spit out a number.
How do i get that number as a python variable ?

OK, thanks.

shawn


More information about the Tutor mailing list