Re: subprocess.popen function with quotes

2008-04-13 Thread skunkwerk
On Mar 26, 10:33 pm, skunkwerk [EMAIL PROTECTED] wrote: On Mar 26, 8:05 am, Jeffrey Froman [EMAIL PROTECTED] wrote: skunkwerkwrote: p = subprocess.Popen(['rename','-vn','s/(.*)\.htm$/ model.html/','*.htm'],stdout=subprocess.PIPE,stderr=subprocess.PIPE) print p.communicate()[0] i

Re: subprocess.popen function with quotes

2008-03-26 Thread Gabriel Genellina
En Wed, 26 Mar 2008 02:15:28 -0300, skunkwerk [EMAIL PROTECTED] escribió: On Mar 25, 9:25 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 26 Mar 2008 00:39:05 -0300, skunkwerk [EMAIL PROTECTED]   escribió:    i'm trying to call subprocess.popen on the 'rename' function in linux.

Re: subprocess.popen function with quotes

2008-03-26 Thread skunkwerk
On Mar 25, 11:04 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 26 Mar 2008 02:15:28 -0300, skunkwerk [EMAIL PROTECTED]   escribió: On Mar 25, 9:25 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 26 Mar 2008 00:39:05 -0300, skunkwerk [EMAIL PROTECTED]   escribió:    

Re: subprocess.popen function with quotes

2008-03-26 Thread skunkwerk
On Mar 26, 6:44 am, skunkwerk [EMAIL PROTECTED] wrote: On Mar 25, 11:04 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 26 Mar 2008 02:15:28 -0300, skunkwerk [EMAIL PROTECTED]   escribió: On Mar 25, 9:25 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 26 Mar 2008

Re: subprocess.popen function with quotes

2008-03-26 Thread Jeffrey Froman
skunkwerk wrote: p = subprocess.Popen(['rename','-vn','s/(.*)\.htm$/ model.html/','*.htm'],stdout=subprocess.PIPE,stderr=subprocess.PIPE) print p.communicate()[0] i change to print p.communicate()[1] in case the output is blank the first time this is the output: *.htm renamed as

Re: subprocess.popen function with quotes

2008-03-26 Thread skunkwerk
On Mar 26, 8:05 am, Jeffrey Froman [EMAIL PROTECTED] wrote: skunkwerk wrote: p = subprocess.Popen(['rename','-vn','s/(.*)\.htm$/ model.html/','*.htm'],stdout=subprocess.PIPE,stderr=subprocess.PIPE) print p.communicate()[0] i change to print p.communicate()[1] in case the output is blank

subprocess.popen function with quotes

2008-03-25 Thread skunkwerk
Hi, i'm trying to call subprocess.popen on the 'rename' function in linux. When I run the command from the shell, like so: rename -vn 's/\.htm$/\.html/' *.htm it works fine... however when I try to do it in python like so: p = subprocess.Popen([rename,-vn,'s/\.htm$/

Re: subprocess.popen function with quotes

2008-03-25 Thread skunkwerk
also, i've tried the Shell=True parameter for Popen, but that didn't seem to make a difference On Mar 25, 8:31 pm, skunkwerk [EMAIL PROTECTED] wrote: Hi, i'm trying to call subprocess.popen on the 'rename' function in linux. When I run the command from the shell, like so: rename -vn

Re: subprocess.popen function with quotes

2008-03-25 Thread Gabriel Genellina
En Wed, 26 Mar 2008 00:39:05 -0300, skunkwerk [EMAIL PROTECTED] escribió: i'm trying to call subprocess.popen on the 'rename' function in linux. When I run the command from the shell, like so: rename -vn 's/\.htm$/\.html/' *.htm it works fine... however when I try to do it in python

Re: subprocess.popen function with quotes

2008-03-25 Thread skunkwerk
On Mar 25, 9:25 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 26 Mar 2008 00:39:05 -0300, skunkwerk [EMAIL PROTECTED]   escribió:    i'm trying to call subprocess.popen on the 'rename' function in linux.  When I run the command from the shell, like so: rename -vn

Re: subprocess.popen function with quotes

2008-03-25 Thread Kurt Smith
On Wed, Mar 26, 2008 at 12:15 AM, skunkwerk [EMAIL PROTECTED] wrote: On Mar 25, 9:25 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 26 Mar 2008 00:39:05 -0300, skunkwerk [EMAIL PROTECTED] escribió: i'm trying to call subprocess.popen on the 'rename' function in