×

Discussion Board

Results 1 to 2 of 2

Thread: Zip files....

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    18

    Smile Zip files....

    Hi, Can anyone tell me how why the code below doesn't work. I have both of the files on my phone.

    Code:
    import zipfile
     
    a=zipfile.ZipFile("C:\\x.zip", "r")
    for i in a.namelist():
         b=open("E:\\"+i, "wb")
         b.write(a.read(i))
         b.close()
    a.close()
    This is a sample code provided in this site.


    Can anyone tell me how to add files to an existing zip file and also how to extract files from a zip file?

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Zip files....

    If it's any help, try reading the Python zipfile documentation for a more detailed description of the possible operations. See also this for a tutorial about appending to archives.

Similar Threads

  1. any experience on j2mepolish preprocessing of UTF-8 source files?
    By jerrytian in forum Mobile Java General
    Replies: 1
    Last Post: 2009-07-25, 11:52
  2. Installing self-signed SIS files (3rd ed.)
    By ptrmn in forum Symbian Tools & SDKs
    Replies: 12
    Last Post: 2006-09-11, 13:08
  3. Series 1&2 .SIS files to Series 3 .SISX files
    By nicelad_uk in forum General Development Questions
    Replies: 2
    Last Post: 2006-07-26, 04:47
  4. FileConnection not all files get displayed !
    By khamouda in forum Mobile Java General
    Replies: 17
    Last Post: 2006-05-26, 07:06
  5. Creating very big files raipdly
    By pink_lemonade in forum Symbian
    Replies: 2
    Last Post: 2004-04-06, 09:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×