Hello, : perl_prog = "perl perlprog.pl" : perl_prog_h ="-h" : #this is where it breaks : subprocess.call([perl_prog, perl_prog_h])
This is asking your Linux to search your $PATH and execute a program called: 'perl perlprog.pl' Rather than to execute a program called 'perl' and pass as the first argument 'perlprog.pl'. perl_bin = 'perl' perl_prog = '/path/to/perlprog.pl' perl_prog_h = '-h' subprocess.call([perl_bin, perl_prog, perl_prog_h]) Or, if I were in your shoes, I would do something a bit more like this: cmd = [ '/usr/bin/perl', '/path/to/perlprog.pl', '-h' ] subprocess.call(cmd) Probably the most interesting thing here for you to note in the long run is to learn what 'magically' happens in the shell when you run a command. Since you are using Linux, you may find strace useful to see what Python is passing to your system for execution: strace -e process python /path/to/your/python/script.py Enjoy, -Martin -- Martin A. Brown http://linux-ip.net/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor