[Tutor] Which Popen For Win32?

Gooch, John John.Gooch at echostar.com
Tue Jun 14 17:07:56 CEST 2005

I am using the Winzip 9.0 Command Line Add-on to archive very large files (
1GB and over ) that are too large to be handled by Zipfile( this bug has
been reported but not resolved ). I tried calling the external program using
os.system(), but something about the output crashes my IDE ( Eclipse ), so I
started looking for a way to run the external application without capturing
the output, as I only care about the exit code ( 0 is good, anything else is
bad ). Here is what I have to far:

    myCmd = os.popen( "%s %s %s %s" % ( zipCommand, zipParameters,
archive,fpath ), 'w' )
    return myCmd.close()

Currently, I have no idea what is being returned by the "close()" method, it
doesn't appear to be the exit code, so perhaps it is the output of the
command. If so, how can I capture and return the exit code?

Thank You, 

John A. Gooch
Systems Administrator
IT - Tools
EchoStar Satellite L.L.C.
9601 S. Meridian Blvd.
Englewood, CO  80112
Desk: 720-514-5708 

-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On Behalf
Of Gary Taylor
Sent: Tuesday, June 14, 2005 8:15 AM
To: tutor at python.org
Subject: Re: [Tutor] Passing command line argument in function

>> ftp.storbinary(stor file_to_transfer, open(file_to_transfer,"r"))
>You need to create the command as a string: ftp.storbinary("stor " + 

That worked perfectly, I was way off.



p.s. sorry for the out of thread message, my mail seems to
be having problems.

squeaky at sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
Tutor maillist  -  Tutor at python.org

More information about the Tutor mailing list