Re: subprocess.call with non-ASCII arguments?

2015-12-16 Thread Ulli Horlacher
Dennis Lee Bieber wrote: > >I want to create a zip file within a Python 2.7 program on windows. > > > >My code: > > > > cmd = ['7za.exe','a','-tzip',archive] + files > > status = subprocess.call(cmd) > > > My first thought would be... > > WHY spawn an OS dependent subprocess...

Re: subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
Dennis Lee Bieber wrote: > Python has a zipfile library that is portable between OS. Along with > libraries for gzip, bzip2, and tarfiles... Ohh.. this is new to me! https://docs.python.org/2/library/tarfile.html https://docs.python.org/2/library/zipfile.html What is missing in the doc

Re: subprocess.call with non-ASCII arguments?

2015-12-15 Thread Laura Creighton
In a message of Tue, 15 Dec 2015 14:25:50 +, Ulli Horlacher writes: >(My first posting seems to got lost) > >I want to create a zip file within a Python 2.7 program on windows. > >My code: > > cmd = ['7za.exe','a','-tzip',archive] + files > status = subprocess.call(cmd) > >leads to: > > File

Re: subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
Ulli Horlacher wrote: > Instead of calling a 7z subprocess with non-ASCII arguments I tried to > call it with a listfile: it starts with a "@" and contains the names of > the files to be packed into the arcive. It is a special 7z feature. > > New code: > > fileslist = archive + '.list' > fl

Re: subprocess.call

2013-04-19 Thread Jens Thoms Toerring
Ombongi Moraa Fe wrote: > [-- text/plain, encoding 7bit, charset: ISO-8859-1, 19 lines --] > In my python script, I have this: > command="lynx -dump > 'phpscript?param1=%s¶m2=%s¶m3=%s¶m4=%s¶m5=%s'"%(value1,value2,value3,value4) > result=subprocess.call(command,shell=True) > print 'xml message'

Re: subprocess.call

2013-04-19 Thread Mau C
Il 19/04/2013 11:56, Ombongi Moraa Fe ha scritto: > Hi Team, > > In my python script, I have this: > > command="lynx -dump > 'phpscript?param1=%s¶m2=%s¶m3=%s¶m4=%s¶m5=%s'"%(value1,value2,value3,value4) http://docs.python.org/2/library/subprocess.html#module-subprocess You should set the properl

RE: subprocess.call

2013-04-19 Thread Ombongi Moraa Fe
Hi Team, In my python script, I have this: command="lynx -dump 'phpscript?param1=%s¶m2=%s¶m3=%s¶m4=%s¶m5=%s'"%(value1,value2,value3,value4) result=subprocess.call(command,shell=True) print 'xml message' However, the response from running the php script is also printed on output screen. I don't

Re: subprocess.call(*args **kwargs) on Linux

2005-06-21 Thread McBooCzech
Thanks a lot :) Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess.call(*args **kwargs) on Linux

2005-06-20 Thread Leif K-Brooks
McBooCzech wrote: > This is easy. Subprocess function "call" looks: > returncode = subprocess.call(["/root/dex/dex","/dev/ttyS0", > "blabla.txt"]) > and it runs smoothly. > > The problem starts when I am trying to add 1>/dev/null 2>/dev/null > parameters to suppres output sendings. from subproces