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...
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
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
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
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'
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
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
Thanks a lot :)
Petr
--
http://mail.python.org/mailman/listinfo/python-list
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