Re: execute shell script from python, needs sys.argv

2010-11-07 Thread Lawrence D'Oliveiro
In message <1vmbd65uaj2snq1v0vo49ktn0lsc2o5...@4ax.com>, Tim Roberts wrote: > I KNOW that we're still working on syntax here, and that it's too early > for optimization, but it bothers me to see "cat" as the first thing in a > pipeline. An anti-UUOC instinct. Very good. :) -- http://mail.python.

Re: execute shell script from python, needs sys.argv

2010-11-06 Thread Tim Roberts
Benjamin Kaplan wrote: > >Python is not the shell. Shell commands are not python commands. You >need either a string or a list of strings, so any literal have to be >in quotes. Also, subprocess can't handle the redirection. You need to >run it as two commands. > >proc1 = subprocess.Popen(["cat", s

Re: execute shell script from python, needs sys.argv

2010-11-04 Thread Peter Otten
Matt wrote: > I am trying to execute a shell script from within python.. This shell > script takes the format, where $1 and $2 are variables from the > command line: cat $1 | Fastx_trimmer -n COUNT -o $2 > > straight into the cmd line it would be: cat file.1 | Fastx_trimmer -n > COUNT -o file.2

Re: execute shell script from python, needs sys.argv

2010-11-04 Thread Benjamin Kaplan
On Thu, Nov 4, 2010 at 11:37 AM, Matt wrote: > Hi All, > > I am trying to execute a shell script from within python..  This shell > script takes the format, where $1 and $2 are variables from the > command line: cat $1 | Fastx_trimmer -n COUNT -o $2 > > straight into the cmd line it would be:  cat