1import Disk_Copy
2import macfs
3import sys
4
5talker = Disk_Copy.Disk_Copy(start=1)
6talker.activate()
7filespec = macfs.FSSpec('my disk image.img')
8try:
9    objref = talker.create('my disk image', saving_as=filespec, leave_image_mounted=1)
10except Disk_Copy.Error, arg:
11    print "ERROR: my disk image:", arg
12else:
13    print 'objref=', objref
14print 'Type return to exit-'
15sys.stdin.readline()
16