#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """ """ __version__ = "$Id$" #end_pymotw_header import array import binascii s = 'This is the array.' a = array.array('c', s) print 'As string:', s print 'As array :', a print 'As hex :', binascii.hexlify(a)