Python Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Python Examples

Quick Start
Python Unicode
Python Byte Array
Python Certs
Python Email
Python Encryption
Python FTP
HTML-to-XML
Python HTTP
Python IMAP
Python MHT
Python MIME
Python RSA
Python S/MIME
Python Signatures
Python Socket
Python Spider
Python Tar
Python Upload
Python XML
Python XMP
Python Zip

More Examples...
String
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

Zip.TempDir Property

Discusses the TempDir property.

Download Python Programming Example Scripts

# file: ZipTempDir.py

import chilkat

# This example discusses the TempDir property.
zip = chilkat.CkZip()
zip.UnlockComponent("anything for 30-day trial")

zip.OpenZip("exampleData.zip")
zip.AppendOneFileOrDir("ZipStrongEncrypted.py")

# Important: The methods that write a zip file or exe file do so by
# first writing to a temporary file in a TempDir.  The TempDir property
# defaults to ".", which is the current working directory of the calling
# process.  The reason a temp .zip is first written is to ensure that the
# original .zip (if it exists) is not lost if the WriteZip method fails
# prior to completion.  Only after WriteZip (or WriteExe, WriteZipAndClose, etc.) 
# completes successfully does the existing .zip (or .exe) file get deleted and
# replaced with the new file.  

# Sometimes programs do not have permission to write to the directory pointed to
# by TempDir.  In that case, change the value of TempDir to a directory path where
# the calling process has permission to create a file:
zip.put_TempDir("c:/temp")

zip.WriteZipAndClose()






 

Need a specific example? Send a request to support@chilkatsoft.com

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