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

 

 

 

 

 

 

 

byteSwap4321 - convert between little-endian and big-endian

4321 byte swap the data in a CkByteArray. This converts between little-endian and big-endian.

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)
data.appendInt(1193046,littleEndian)
data.appendInt(1193046,littleEndian)

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

#  Byte swap...
data.byteSwap4321()

#  Examine the bytes again...
print data.getEncoded("hex")


 

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

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