ยปCore Development>Code coverage>Mac/Demo/applescript/Disk_Copy/Utility_Events.py

Python code coverage for Mac/Demo/applescript/Disk_Copy/Utility_Events.py

#countcontent
1n/a"""Suite Utility Events: Commands that allow the user to select Disk Copy files
2n/aLevel 1, version 1
3n/a
4n/aGenerated from Macintosh HD:Hulpprogramma's:Disk Copy
5n/aAETE/AEUT resource version 1/0, language 0, script 0
6n/a"""
7n/a
8n/aimport aetools
9n/aimport MacOS
10n/a
11n/a_code = 'ddsk'
12n/a
13n/aclass Utility_Events_Events:
14n/a
15n/a _argmap_select_disk_image = {
16n/a 'with_prompt' : 'SELp',
17n/a }
18n/a
19n/a def select_disk_image(self, _no_object=None, _attributes={}, **_arguments):
20n/a """select disk image: Prompt the user to select a disk image
21n/a Keyword argument with_prompt: the prompt string to be displayed
22n/a Keyword argument _attributes: AppleEvent attribute dictionary
23n/a Returns: a reference to a disk image
24n/a """
25n/a _code = 'UTIL'
26n/a _subcode = 'SEL1'
27n/a
28n/a aetools.keysubst(_arguments, self._argmap_select_disk_image)
29n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
30n/a
31n/a aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)
32n/a
33n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
34n/a _arguments, _attributes)
35n/a if _arguments.has_key('errn'):
36n/a raise aetools.Error, aetools.decodeerror(_arguments)
37n/a # XXXX Optionally decode result
38n/a if _arguments.has_key('----'):
39n/a return _arguments['----']
40n/a
41n/a _argmap_select_DiskScript = {
42n/a 'with_prompt' : 'SELp',
43n/a }
44n/a
45n/a def select_DiskScript(self, _no_object=None, _attributes={}, **_arguments):
46n/a """select DiskScript: Prompt the user to select a DiskScript
47n/a Keyword argument with_prompt: the prompt string to be displayed
48n/a Keyword argument _attributes: AppleEvent attribute dictionary
49n/a Returns: a reference to a DiskScript
50n/a """
51n/a _code = 'UTIL'
52n/a _subcode = 'SEL2'
53n/a
54n/a aetools.keysubst(_arguments, self._argmap_select_DiskScript)
55n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
56n/a
57n/a aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)
58n/a
59n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
60n/a _arguments, _attributes)
61n/a if _arguments.has_key('errn'):
62n/a raise aetools.Error, aetools.decodeerror(_arguments)
63n/a # XXXX Optionally decode result
64n/a if _arguments.has_key('----'):
65n/a return _arguments['----']
66n/a
67n/a _argmap_select_disk_image_or_DiskScript = {
68n/a 'with_prompt' : 'SELp',
69n/a }
70n/a
71n/a def select_disk_image_or_DiskScript(self, _no_object=None, _attributes={}, **_arguments):
72n/a """select disk image or DiskScript: Prompt the user to select a disk image or DiskScript
73n/a Keyword argument with_prompt: the prompt string to be displayed
74n/a Keyword argument _attributes: AppleEvent attribute dictionary
75n/a Returns: a reference to disk image or a DiskScript
76n/a """
77n/a _code = 'UTIL'
78n/a _subcode = 'SEL3'
79n/a
80n/a aetools.keysubst(_arguments, self._argmap_select_disk_image_or_DiskScript)
81n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
82n/a
83n/a aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)
84n/a
85n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
86n/a _arguments, _attributes)
87n/a if _arguments.has_key('errn'):
88n/a raise aetools.Error, aetools.decodeerror(_arguments)
89n/a # XXXX Optionally decode result
90n/a if _arguments.has_key('----'):
91n/a return _arguments['----']
92n/a
93n/a _argmap_select_floppy_disk_image = {
94n/a 'with_prompt' : 'SELp',
95n/a }
96n/a
97n/a def select_floppy_disk_image(self, _no_object=None, _attributes={}, **_arguments):
98n/a """select floppy disk image: Prompt the user to select a floppy disk image
99n/a Keyword argument with_prompt: the prompt string to be displayed
100n/a Keyword argument _attributes: AppleEvent attribute dictionary
101n/a Returns: a reference to a floppy disk image
102n/a """
103n/a _code = 'UTIL'
104n/a _subcode = 'SEL4'
105n/a
106n/a aetools.keysubst(_arguments, self._argmap_select_floppy_disk_image)
107n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
108n/a
109n/a aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)
110n/a
111n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
112n/a _arguments, _attributes)
113n/a if _arguments.has_key('errn'):
114n/a raise aetools.Error, aetools.decodeerror(_arguments)
115n/a # XXXX Optionally decode result
116n/a if _arguments.has_key('----'):
117n/a return _arguments['----']
118n/a
119n/a _argmap_select_disk = {
120n/a 'with_prompt' : 'SELp',
121n/a }
122n/a
123n/a def select_disk(self, _no_object=None, _attributes={}, **_arguments):
124n/a """select disk: Prompt the user to select a disk volume
125n/a Keyword argument with_prompt: the prompt string to be displayed
126n/a Keyword argument _attributes: AppleEvent attribute dictionary
127n/a Returns: a reference to the disk
128n/a """
129n/a _code = 'UTIL'
130n/a _subcode = 'SEL5'
131n/a
132n/a aetools.keysubst(_arguments, self._argmap_select_disk)
133n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
134n/a
135n/a aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)
136n/a
137n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
138n/a _arguments, _attributes)
139n/a if _arguments.has_key('errn'):
140n/a raise aetools.Error, aetools.decodeerror(_arguments)
141n/a # XXXX Optionally decode result
142n/a if _arguments.has_key('----'):
143n/a return _arguments['----']
144n/a
145n/a _argmap_select_folder = {
146n/a 'with_prompt' : 'SELp',
147n/a }
148n/a
149n/a def select_folder(self, _no_object=None, _attributes={}, **_arguments):
150n/a """select folder: Prompt the user to select a folder
151n/a Keyword argument with_prompt: the prompt string to be displayed
152n/a Keyword argument _attributes: AppleEvent attribute dictionary
153n/a Returns: a reference to the folder
154n/a """
155n/a _code = 'UTIL'
156n/a _subcode = 'SEL6'
157n/a
158n/a aetools.keysubst(_arguments, self._argmap_select_folder)
159n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
160n/a
161n/a aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)
162n/a
163n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
164n/a _arguments, _attributes)
165n/a if _arguments.has_key('errn'):
166n/a raise aetools.Error, aetools.decodeerror(_arguments)
167n/a # XXXX Optionally decode result
168n/a if _arguments.has_key('----'):
169n/a return _arguments['----']
170n/a
171n/a _argmap_log = {
172n/a 'time_stamp' : 'TSMP',
173n/a }
174n/a
175n/a def log(self, _object, _attributes={}, **_arguments):
176n/a """log: Add a string to the log window
177n/a Required argument: the string to add to the log window
178n/a Keyword argument time_stamp: Should the log entry be time-stamped? (false if not supplied)
179n/a Keyword argument _attributes: AppleEvent attribute dictionary
180n/a """
181n/a _code = 'UTIL'
182n/a _subcode = 'LOG '
183n/a
184n/a aetools.keysubst(_arguments, self._argmap_log)
185n/a _arguments['----'] = _object
186n/a
187n/a aetools.enumsubst(_arguments, 'TSMP', _Enum_bool)
188n/a
189n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
190n/a _arguments, _attributes)
191n/a if _arguments.has_key('errn'):
192n/a raise aetools.Error, aetools.decodeerror(_arguments)
193n/a # XXXX Optionally decode result
194n/a if _arguments.has_key('----'):
195n/a return _arguments['----']
196n/a
197n/a_Enum_TEXT = None # XXXX enum TEXT not found!!
198n/a_Enum_bool = None # XXXX enum bool not found!!
199n/a
200n/a#
201n/a# Indices of types declared in this module
202n/a#
203n/a_classdeclarations = {
204n/a}
205n/a
206n/a_propdeclarations = {
207n/a}
208n/a
209n/a_compdeclarations = {
210n/a}
211n/a
212n/a_enumdeclarations = {
213n/a}