PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Mac/Demo/applescript/makedisk.py

http://unladen-swallow.googlecode.com/
Python | 15 lines | 14 code | 1 blank | 0 comment | 0 complexity | 11b4105c29aa7344b4f11f1e38a38fd7 MD5 | raw file
 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()