January 6th, 2004, 03:30 PM
running bash command
total python noob here
how can i run a bash command from within a python script - like perl does with the `ls` backticks?
January 6th, 2004, 04:13 PM
January 7th, 2004, 02:24 AM
os.system won't help if you want the output. commands.getoutput is the easiest way, but there are also the popen* modules to allow advanced control of all the possible file-handle combinations involved with process invocation and management.
However, for specifically getting directory contents, use os.listdir.
January 7th, 2004, 08:52 AM