[Tutor] trouble understanding the difference

johnf jfabiani at yolo.com
Fri Apr 10 18:47:13 CEST 2009


On Friday 10 April 2009 09:41:13 am johnf wrote:
> On Friday 10 April 2009 08:35:13 am johnf wrote:
> > I can get the following to work:
> > os.system('lp -d printer invoice.pdf')
> >
> > but what I think is the correct way for the future is:
> > subprocess.Popen('lp -d printer invoice.pdf')
> > and it does not work???
> >
> > Can someone explain what I'm doing wrong?

Thanks to 
 "Weidner, Ronald" <RWeidner at ea.com>
the correct way is

subprocess.Popen(['lp', '-d', 'printer', 'invoice.pdf'])



-- 
John Fabiani


More information about the Tutor mailing list