What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » cgi generate a zip file

cgi generate a zip file
Author: Message:
Jarrod
Veteran Member
*****

Avatar
woot simpson

Posts: 1304
Reputation: 20
– / Male / Flag
Joined: Sep 2006
O.P. RE: cgi generate a zip file
Python code:
import zipfile,os
ziped = zipfile.ZipFile('project.zip', 'w')
print "Content-Type: text/html"
print
print """
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
</head><body><center>"""

x=os.listdir("./")
for item in x:
    if item!="project.zip":
        ziped.write(item)
print "<br>"*5
print"<a href='project.zip'>Click Here to download the source codes</a>"
 
print"""
</body>
</html>"""


This post was edited on 04-23-2009 at 11:37 AM by Jarrod.

[Image: 5344.png]
[Image: sig.png]

A.k.a. The Glad Falconer














04-23-2009 11:36 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
cgi generate a zip file - by Jarrod on 04-23-2009 at 11:23 AM
RE: cgi generate a zip file - by prashker on 04-23-2009 at 11:31 AM
RE: cgi generate a zip file - by Jarrod on 04-23-2009 at 11:36 AM
RE: cgi generate a zip file - by prashker on 04-23-2009 at 11:59 AM
RE: cgi generate a zip file - by Jarrod on 04-23-2009 at 12:10 PM
RE: cgi generate a zip file - by -dt- on 04-23-2009 at 12:53 PM
RE: cgi generate a zip file - by Jarrod on 04-23-2009 at 10:29 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On