summaryrefslogtreecommitdiff
path: root/Mac/Demo/applescript/makedisk.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-08-20 21:57:38 +0000
committerJack Jansen <jack.jansen@cwi.nl>2000-08-20 21:57:38 +0000
commitc15ab036df6820071ee867f5fa9fcfc87b85dcde (patch)
treea76a7f8538c0b58b8326929a439085e249a24d2f /Mac/Demo/applescript/makedisk.py
parente743c6e27e192b148528fa05d6207bd2a272f528 (diff)
downloadcpython-git-c15ab036df6820071ee867f5fa9fcfc87b85dcde.tar.gz
Updated the applescript documentation for te new framework, and replaced the Eudora example with one that uses Disk Copy (which everyone running MacOS 8 or
higher should have).
Diffstat (limited to 'Mac/Demo/applescript/makedisk.py')
-rw-r--r--Mac/Demo/applescript/makedisk.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Mac/Demo/applescript/makedisk.py b/Mac/Demo/applescript/makedisk.py
new file mode 100644
index 0000000000..3016964d40
--- /dev/null
+++ b/Mac/Demo/applescript/makedisk.py
@@ -0,0 +1,15 @@
+import Disk_Copy
+import macfs
+import sys
+
+talker = Disk_Copy.Disk_Copy(start=1)
+talker.activate()
+filespec = macfs.FSSpec('my disk image.img')
+try:
+ objref = talker.create('my disk image', saving_as=filespec, leave_image_mounted=1)
+except Disk_Copy.Error, arg:
+ print "ERROR: my disk image:", arg
+else:
+ print 'objref=', objref
+print 'Type return to exit-'
+sys.stdin.readline()