[Zope] Python script problem

Dennis Allison allison@sumeru.stanford.EDU
Sat, 10 Aug 2002 19:21:52 -0700


On Saturday 10 August 2002 05:57 am, list_subscriber@neurobs.com wrote:
> Hi,
> I am trying to call 'zip'(linux) from within my python external method. The 
is
> what I do:
> 
> ### SRC ###
> 
> import os
> 
> src_dir = 'some_dir'
> cmd_apth = '/usr/bin/zip'
> zip_file_name = 'res.zip'
> 
> os.chdir(src_dir)
> result = os.spawnl(os.P_WAIT,cmd_path,'-rv',zip_file_name,'.')
> print result
> 
> ### END SRC ###
> 

I'm guessing that you are just tring to invoke zip on the res.zip.  

Seems to me that you probably want to just use the system command --

import os
os.system( '/usr/bin/zip res.zip' )