I want to run a command line program from within a python script and get the output.
How do I get the information that is displayed by foo so that I can use it in my script?
For example, I call foo file1
from the command line and it prints out
Size: 3KB
Name: file1.txt
Other stuff: blah
How can I get the file name doing something like filename = os.system('foo file1')
?