Re: lpr via subprocess in 2.4

2010-08-04 Thread James Mills
On Wed, Aug 4, 2010 at 9:38 PM, loial wrote: > I have also been trying to get the return code and standard error. p = Popen("..., stderr=PIPE) Look up the docs for subprocess.Popen cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo

Re: lpr via subprocess in 2.4

2010-08-04 Thread loial
Thanks...that worked. I have also been trying to get the return code and standard error. How do I access these? #!/usr/bin/python import os import subprocess process=subprocess.Popen(['lpr', '-P' ,'raserlpr','/etc/hosts'], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) print proce

Re: lpr via subprocess in 2.4

2010-08-04 Thread Peter Otten
loial wrote: > I am am trying to run the following command via subprocess > > lpr -P printqueue filetoprint > > I cannot seem to get it to work and return stderr > > I think the issue is how to specify the arguments > > I am trying > > subprocess.Popen(['lpr -P' ,'laserlpr','/etc/hosts'], she

lpr via subprocess in 2.4

2010-08-04 Thread loial
I am am trying to run the following command via subprocess lpr -P printqueue filetoprint I cannot seem to get it to work and return stderr I think the issue is how to specify the arguments I am trying subprocess.Popen(['lpr -P' ,'laserlpr','/etc/hosts'], shell=False) but get error : Tracebac