Re: Zipping files

2012-11-13 Thread Mark Lawrence
On 13/11/2012 23:52, Smaran Harihar wrote: Hi Guys, I am trying to create a script which will zip a bunch of files that I have obtained using the 'glob' So I have a bunch of files, glob.glob("shp/file1*) And I want to zip all the files which are returned by the above command. How can I do tha

Re: Zipping files

2008-07-15 Thread Tim Golden
dp_pearce wrote: When I saw "Permission denied", this was my suspicion. And I think you are very right. I have just gone back and tried writing to a file outside of C:, in this case C:/output/, and it seems to work again. Would I be right in guessing there is no way around this? Well, you coul

Re: Zipping files

2008-07-15 Thread dp_pearce
When I saw "Permission denied", this was my suspicion. And I think you are very right. I have just gone back and tried writing to a file outside of C:, in this case C:/output/, and it seems to work again. Would I be right in guessing there is no way around this? Dan -- http://mail.python.org/mail

Re: Zipping files

2008-07-15 Thread Tim Golden
dp_pearce wrote: Hi all, I have come across an error while using zipfile and I can't seem to find somewhere that explains the problem. My script needs to be able to take text files from one drive and add them to zip files on another drive. The following seems to work just fine. import zipfile

Re: Zipping Files to user defined Directory

2006-09-02 Thread Danny Milosavljevic
Hi, On Fri, 28 Jul 2006 05:25:38 -0700, OriginalBrownster wrote: > Marc 'BlackJack' Rintsch wrote: >> In <[EMAIL PROTECTED]>, >> OriginalBrownster wrote: >> [...] >> After the user selected the files you have to zip them on the server, >> for instance in a temporary in the `/tmp/` directory and t

Re: Zipping files/zipfile module

2006-08-02 Thread Brian Beck
Yves Lange wrote: > Other solutions: > you can try the rar command line from WinRar but it's not recommended. > This is a very slow manner to compress file. Are you sure? This worked about 4 times faster than the zip command line utility in Linux, compressing the same files... -- Brian Beck Adve

Re: Zipping files/zipfile module

2006-08-02 Thread Ant
Enabling directory recursion: > from os import listdir, mkdir > from os.path import join, basename, isfile > from zipfile import ZipFile > > def zip_dir(path, output_path, include_hidden=True): > try: > mkdir(output_path) > except OSError, e: > if e.errno == 17: # Path exis

Re: Zipping files/zipfile module

2006-08-02 Thread Yves Lange
Simon Forman a écrit : > Brian Beck wrote: >> OriginalBrownster wrote: >>> I want to zip all the files within a directory called "temp" >>> and have the zip archive saved in a directory with temp called ziptemp >>> >>> I was trying to read up on how to use the zipfile module python >>> provides, bu

Re: Zipping files/zipfile module

2006-08-02 Thread Simon Forman
Brian Beck wrote: > OriginalBrownster wrote: > > I want to zip all the files within a directory called "temp" > > and have the zip archive saved in a directory with temp called ziptemp > > > > I was trying to read up on how to use the zipfile module python > > provides, but I cannot seem to find ad

Re: Zipping files/zipfile module

2006-08-01 Thread Brian Beck
OriginalBrownster wrote: > I want to zip all the files within a directory called "temp" > and have the zip archive saved in a directory with temp called ziptemp > > I was trying to read up on how to use the zipfile module python > provides, but I cannot seem to find adequate documentation on funct

Re: Zipping Files to user defined Directory

2006-07-28 Thread OriginalBrownster
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, > OriginalBrownster wrote: > > > I'm very new to python, and I have been using the TurboGears Framework > > to use python to power my application. > > > > [...] > > > > my problems is that when I want to download that file from the server I

Re: Zipping Files to user defined Directory

2006-07-28 Thread OriginalBrownster
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, > OriginalBrownster wrote: > > > I'm very new to python, and I have been using the TurboGears Framework > > to use python to power my application. > > > > [...] > > > > my problems is that when I want to download that file from the server I

Re: Zipping Files to user defined Directory

2006-07-27 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, OriginalBrownster wrote: > I'm very new to python, and I have been using the TurboGears Framework > to use python to power my application. > > […] > > my problems is that when I want to download that file from the server I > want to zip the files selected. but how does a