subprocess problem on WinXP



Hi,

I want to compress all files (also in subfolder). The code is working more or less, but I get a black popup window (command line window) for every file to compress. How do I cave to change my system call that nothing pops up?

Wolfgang

import os
import subprocess

dir="g:\\messtech"

for root, dirs, files in os.walk(dir):
for file in files:
f=os.path.join(root,file)
subprocess.Popen([r"bzip2",'', f],shell=False).wait()

.



Relevant Pages

  • Re: subprocess problem on WinXP
    ... I want to compress all files (also in subfolder). ... but I get a black popup window (command line window) for ...
    (comp.lang.python)
  • Re: Nmon scheduling question
    ... Runs "gzip" to compress it. ... # Script to generate the spreadsheet, compress, & email daily logfiles ... # generated by the daily nmon command run by the cron. ...
    (AIX-L)
  • Re: De-compress a file from UNIX
    ... > compressed using the UNIX compress command. ... However, if you know in advance that you have access to WinZip on the host, ... the you could easily command WinZip to decompress the file. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: MISSING COLON BEFROE COMMAND
    ... I have used the POSIX compress command in a job as follows for several years with no problems. ... I have a stream with the following step in the middle of the stream: ... To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • Re: find command tweak
    ... Subject: find command tweak ... I want to compress all files in "/archivefiles" with the following ... The security of electronic mail sent through the Internet ... Legg Mason therefore recommends that you do not ...
    (AIX-L)