Mercurial > cpython-lru_cache-weakref
annotate Mac/Demo/applescript/Disk_Copy/Utility_Events.py @ 80661:94de77bd0b4b 2.7
Issue #16194: document imp.load_dynamic problems
when read several extension modules from the same binary object file.
| author | Andrew Svetlov <andrew.svetlov@gmail.com> |
|---|---|
| date | Thu, 29 Nov 2012 19:51:28 +0200 |
| parents | 01a7e66525c2 |
| children |
| rev | line source |
|---|---|
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1 """Suite Utility Events: Commands that allow the user to select Disk Copy files |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2 Level 1, version 1 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
4 Generated from Macintosh HD:Hulpprogramma's:Disk Copy |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
5 AETE/AEUT resource version 1/0, language 0, script 0 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
6 """ |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
7 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
8 import aetools |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
9 import MacOS |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
10 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
11 _code = 'ddsk' |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
12 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
13 class Utility_Events_Events: |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
14 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
15 _argmap_select_disk_image = { |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
16 'with_prompt' : 'SELp', |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
17 } |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
18 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
19 def select_disk_image(self, _no_object=None, _attributes={}, **_arguments): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
20 """select disk image: Prompt the user to select a disk image |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
21 Keyword argument with_prompt: the prompt string to be displayed |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
22 Keyword argument _attributes: AppleEvent attribute dictionary |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
23 Returns: a reference to a disk image |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
24 """ |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
25 _code = 'UTIL' |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
26 _subcode = 'SEL1' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
27 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
28 aetools.keysubst(_arguments, self._argmap_select_disk_image) |
|
46197
01a7e66525c2
#2503 make singletons compared with "is" not == or !=
Benjamin Peterson <benjamin@python.org>
parents:
32736
diff
changeset
|
29 if _no_object is not None: raise TypeError, 'No direct arg expected' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
30 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
31 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT) |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
32 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
33 _reply, _arguments, _attributes = self.send(_code, _subcode, |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
34 _arguments, _attributes) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
35 if _arguments.has_key('errn'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
36 raise aetools.Error, aetools.decodeerror(_arguments) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
37 # XXXX Optionally decode result |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
38 if _arguments.has_key('----'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
39 return _arguments['----'] |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
40 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
41 _argmap_select_DiskScript = { |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
42 'with_prompt' : 'SELp', |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
43 } |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
44 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
45 def select_DiskScript(self, _no_object=None, _attributes={}, **_arguments): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
46 """select DiskScript: Prompt the user to select a DiskScript |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
47 Keyword argument with_prompt: the prompt string to be displayed |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
48 Keyword argument _attributes: AppleEvent attribute dictionary |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
49 Returns: a reference to a DiskScript |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
50 """ |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
51 _code = 'UTIL' |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
52 _subcode = 'SEL2' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
53 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
54 aetools.keysubst(_arguments, self._argmap_select_DiskScript) |
|
46197
01a7e66525c2
#2503 make singletons compared with "is" not == or !=
Benjamin Peterson <benjamin@python.org>
parents:
32736
diff
changeset
|
55 if _no_object is not None: raise TypeError, 'No direct arg expected' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
56 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
57 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT) |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
58 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
59 _reply, _arguments, _attributes = self.send(_code, _subcode, |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
60 _arguments, _attributes) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
61 if _arguments.has_key('errn'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
62 raise aetools.Error, aetools.decodeerror(_arguments) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
63 # XXXX Optionally decode result |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
64 if _arguments.has_key('----'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
65 return _arguments['----'] |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
66 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
67 _argmap_select_disk_image_or_DiskScript = { |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
68 'with_prompt' : 'SELp', |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
69 } |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
70 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
71 def select_disk_image_or_DiskScript(self, _no_object=None, _attributes={}, **_arguments): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
72 """select disk image or DiskScript: Prompt the user to select a disk image or DiskScript |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
73 Keyword argument with_prompt: the prompt string to be displayed |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
74 Keyword argument _attributes: AppleEvent attribute dictionary |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
75 Returns: a reference to disk image or a DiskScript |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
76 """ |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
77 _code = 'UTIL' |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
78 _subcode = 'SEL3' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
79 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
80 aetools.keysubst(_arguments, self._argmap_select_disk_image_or_DiskScript) |
|
46197
01a7e66525c2
#2503 make singletons compared with "is" not == or !=
Benjamin Peterson <benjamin@python.org>
parents:
32736
diff
changeset
|
81 if _no_object is not None: raise TypeError, 'No direct arg expected' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
82 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
83 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT) |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
84 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
85 _reply, _arguments, _attributes = self.send(_code, _subcode, |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
86 _arguments, _attributes) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
87 if _arguments.has_key('errn'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
88 raise aetools.Error, aetools.decodeerror(_arguments) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
89 # XXXX Optionally decode result |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
90 if _arguments.has_key('----'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
91 return _arguments['----'] |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
92 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
93 _argmap_select_floppy_disk_image = { |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
94 'with_prompt' : 'SELp', |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
95 } |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
96 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
97 def select_floppy_disk_image(self, _no_object=None, _attributes={}, **_arguments): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
98 """select floppy disk image: Prompt the user to select a floppy disk image |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
99 Keyword argument with_prompt: the prompt string to be displayed |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
100 Keyword argument _attributes: AppleEvent attribute dictionary |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
101 Returns: a reference to a floppy disk image |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
102 """ |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
103 _code = 'UTIL' |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
104 _subcode = 'SEL4' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
105 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
106 aetools.keysubst(_arguments, self._argmap_select_floppy_disk_image) |
|
46197
01a7e66525c2
#2503 make singletons compared with "is" not == or !=
Benjamin Peterson <benjamin@python.org>
parents:
32736
diff
changeset
|
107 if _no_object is not None: raise TypeError, 'No direct arg expected' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
108 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
109 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT) |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
110 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
111 _reply, _arguments, _attributes = self.send(_code, _subcode, |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
112 _arguments, _attributes) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
113 if _arguments.has_key('errn'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
114 raise aetools.Error, aetools.decodeerror(_arguments) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
115 # XXXX Optionally decode result |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
116 if _arguments.has_key('----'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
117 return _arguments['----'] |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
118 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
119 _argmap_select_disk = { |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
120 'with_prompt' : 'SELp', |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
121 } |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
122 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
123 def select_disk(self, _no_object=None, _attributes={}, **_arguments): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
124 """select disk: Prompt the user to select a disk volume |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
125 Keyword argument with_prompt: the prompt string to be displayed |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
126 Keyword argument _attributes: AppleEvent attribute dictionary |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
127 Returns: a reference to the disk |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
128 """ |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
129 _code = 'UTIL' |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
130 _subcode = 'SEL5' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
131 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
132 aetools.keysubst(_arguments, self._argmap_select_disk) |
|
46197
01a7e66525c2
#2503 make singletons compared with "is" not == or !=
Benjamin Peterson <benjamin@python.org>
parents:
32736
diff
changeset
|
133 if _no_object is not None: raise TypeError, 'No direct arg expected' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
134 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
135 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT) |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
136 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
137 _reply, _arguments, _attributes = self.send(_code, _subcode, |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
138 _arguments, _attributes) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
139 if _arguments.has_key('errn'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
140 raise aetools.Error, aetools.decodeerror(_arguments) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
141 # XXXX Optionally decode result |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
142 if _arguments.has_key('----'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
143 return _arguments['----'] |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
144 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
145 _argmap_select_folder = { |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
146 'with_prompt' : 'SELp', |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
147 } |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
148 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
149 def select_folder(self, _no_object=None, _attributes={}, **_arguments): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
150 """select folder: Prompt the user to select a folder |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
151 Keyword argument with_prompt: the prompt string to be displayed |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
152 Keyword argument _attributes: AppleEvent attribute dictionary |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
153 Returns: a reference to the folder |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
154 """ |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
155 _code = 'UTIL' |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
156 _subcode = 'SEL6' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
157 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
158 aetools.keysubst(_arguments, self._argmap_select_folder) |
|
46197
01a7e66525c2
#2503 make singletons compared with "is" not == or !=
Benjamin Peterson <benjamin@python.org>
parents:
32736
diff
changeset
|
159 if _no_object is not None: raise TypeError, 'No direct arg expected' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
160 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
161 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT) |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
162 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
163 _reply, _arguments, _attributes = self.send(_code, _subcode, |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
164 _arguments, _attributes) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
165 if _arguments.has_key('errn'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
166 raise aetools.Error, aetools.decodeerror(_arguments) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
167 # XXXX Optionally decode result |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
168 if _arguments.has_key('----'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
169 return _arguments['----'] |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
170 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
171 _argmap_log = { |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
172 'time_stamp' : 'TSMP', |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
173 } |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
174 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
175 def log(self, _object, _attributes={}, **_arguments): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
176 """log: Add a string to the log window |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
177 Required argument: the string to add to the log window |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
178 Keyword argument time_stamp: Should the log entry be time-stamped? (false if not supplied) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
179 Keyword argument _attributes: AppleEvent attribute dictionary |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
180 """ |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
181 _code = 'UTIL' |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
182 _subcode = 'LOG ' |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
183 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
184 aetools.keysubst(_arguments, self._argmap_log) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
185 _arguments['----'] = _object |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
186 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
187 aetools.enumsubst(_arguments, 'TSMP', _Enum_bool) |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
188 |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
189 _reply, _arguments, _attributes = self.send(_code, _subcode, |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
190 _arguments, _attributes) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
191 if _arguments.has_key('errn'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
192 raise aetools.Error, aetools.decodeerror(_arguments) |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
193 # XXXX Optionally decode result |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
194 if _arguments.has_key('----'): |
|
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
14091
diff
changeset
|
195 return _arguments['----'] |
|
14091
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
196 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
197 _Enum_TEXT = None # XXXX enum TEXT not found!! |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
198 _Enum_bool = None # XXXX enum bool not found!! |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
199 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
200 # |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
201 # Indices of types declared in this module |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
202 # |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
203 _classdeclarations = { |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
204 } |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
205 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
206 _propdeclarations = { |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
207 } |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
208 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
209 _compdeclarations = { |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
210 } |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
211 |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
212 _enumdeclarations = { |
|
d3f5b453ade8
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
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
213 } |
