Reputation: 357
I am reading a list of unix command line programs from a file into a list, pList. All of the programs are in my PATH. I then assign one of the entries to a variable: prog.
I would then like to execute that program using the non standard module sh
sh.prog('arguments')
However, sh interprets the name prog literally, and not as a variable containing a string. It looks for the program prog, which doesn't exist. Is there a way around this problem? Would using the subprocess call function have the same problem? How can I get around this?
Upvotes: 0
Views: 73