source:
trunk/essentials/dev-lang/python/Mac/Demo/applescript/makedisk.py@
3226
| Last change on this file since 3226 was 3225, checked in by , 19 years ago | |
|---|---|
| File size: 387 bytes | |
| Line | |
|---|---|
| 1 | import Disk_Copy |
| 2 | import macfs |
| 3 | import sys |
| 4 | |
| 5 | talker = Disk_Copy.Disk_Copy(start=1) |
| 6 | talker.activate() |
| 7 | filespec = macfs.FSSpec('my disk image.img') |
| 8 | try: |
| 9 | objref = talker.create('my disk image', saving_as=filespec, leave_image_mounted=1) |
| 10 | except Disk_Copy.Error, arg: |
| 11 | print "ERROR: my disk image:", arg |
| 12 | else: |
| 13 | print 'objref=', objref |
| 14 | print 'Type return to exit-' |
| 15 | sys.stdin.readline() |
Note:
See TracBrowser
for help on using the repository browser.
