Invoking Unix commands from a Python app

Rob Cowie cowie.rob at gmail.com
Fri Dec 16 11:06:08 EST 2005


Ok, I know see that os.spawnl() will suffice. However, how do I
retrieve the output of the command.

For example,

  import os
  os.spawnl(os.P_WAIT, '/bin/date')

Successfully executes the 'date' app, but I am unaware of how to get
its output




More information about the Python-list mailing list