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
Service
PPMD
Deflate
DH Key Exchange
DSA
SSH Key
SSH
SSH Tunnel
SFTP

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

appendInt, appendShort, appendStr

Append 4-byte integer, 2-byte short integer, and string to CkByteData.

Download Chilkat Python Library

import chilkat

data = chilkat.CkByteData()

littleEndian = True

#  Append 4-byte signed integer in little-endian byte-order
#  ( 1193046 decimal = 0x123456 hex )
data.appendInt(1193046,littleEndian)

#  Append 2-byte signed integer in little-endian byte-order
#  ( 4660 decimal = 0x1234 hex )
data.appendShort(4660,littleEndian)

#  Append an ANSI string:
data.appendStr("ABCD")

#  Examine the bytes as a hex encoded string:
print data.getEncoded("hex")
 

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

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