Python Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

Python Examples

Quick Start
Unicode
Byte Array
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML Conversion
HTTP
IMAP
MHT
MIME
POP3
RSA
S/MIME
Signatures
Socket / SSL
SFTP
SMTP
Spider
SSH Key
SSH
SSH Tunnel
Tar
HTTP Upload
XML
XMP
Zip

More Examples...
String
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

 

Add Contents of String Variable to Zip

 Chilkat Python Module Downloads for Windows, Linux, and MAC OS X

Demonstrates how to insert the contents of a string variable into a .zip.

# file: ZipFromMemory.py

import chilkat

# Create a .zip archive from in-memory data.
zip = chilkat.CkZip()
zip.UnlockComponent("anything for 30-day trial")

zip.NewZip("fromMemory.zip")

str = ""
for i in range(0,100):
	str = str + "abcdefghijklmnopqrstuvwxyz\n"
zip.AppendString("string1.txt",str)

str = ""
for i in range(0,100):
	str = str + "1234567890\n"

zip.AppendString("string2.txt",str)

# Creates "fromMemory.zip" which contains two files:
# string1.txt and string2.txt
zip.WriteZipAndClose()







 

© 2000-2010 Chilkat Software, Inc. All Rights Reserved.