shawn bright wrote:
> 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 ?
You need to use the subprocess module, specifically subprocess.Popen, to
open an input pipe from the command so you can read() the data in.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor