summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-08-03 14:07:52 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-08-03 14:07:52 (GMT)
commitdffae32172e730393bc7610ede575633d16783d3 (patch)
treedae44224d64374d3cd3cc85b8f63df8a3d9ca9d7 /Mac
parentb4c975a3675b6475749ead798de14f85d4efec0c (diff)
downloadcpython-dffae32172e730393bc7610ede575633d16783d3.zip
cpython-dffae32172e730393bc7610ede575633d16783d3.tar.gz
cpython-dffae32172e730393bc7610ede575633d16783d3.tar.bz2
Obsolete: uses old applescript support.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/test/testfinderopen.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/Mac/Lib/test/testfinderopen.py b/Mac/Lib/test/testfinderopen.py
deleted file mode 100644
index 8ecf424..0000000
--- a/Mac/Lib/test/testfinderopen.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""Make the finder open an application, file or folder"""
-
-import Finder_7_0_Suite
-import aetools
-import MacOS
-import sys
-import macfs
-
-SIGNATURE='MACS'
-
-class Finder(aetools.TalkTo, Finder_7_0_Suite.Finder_7_0_Suite):
- pass
-
-def open_in_finder(file):
- """Open a file thru the finder. Specify file by name or fsspec"""
- finder = Finder(SIGNATURE)
- fss = macfs.FSSpec(file)
- vRefNum, parID, name = fss.as_tuple()
- dir_fss = macfs.FSSpec((vRefNum, parID, ''))
- file_alias = fss.NewAlias()
- dir_alias = dir_fss.NewAlias()
- return finder.open(file_alias, items=[file_alias])
-
-def main():
- fss, ok = macfs.PromptGetFile('File to launch:')
- if not ok: sys.exit(0)
- result = open_in_finder(fss)
- if result:
- print 'Result: ', result
-
-if __name__ == '__main__':
- main()
-