Allow comment characters (#) to be escaped:
[python/dscho.git] / Mac / Lib / lib-scripting / Required_Suite.py
blobd9aa5b9667b01b0facf65d1400fc17d5f77b46c8
1 """Suite Required Suite: Terms that every application should support
2 Level 1, version 1
4 Generated from flap:System Folder:Extensions:Scripting Additions:Dialects:English Dialect
5 AETE/AEUT resource version 1/0, language 0, script 0
6 """
8 import aetools
9 import MacOS
11 _code = 'reqd'
13 class Required_Suite:
15 def open(self, _object, _attributes={}, **_arguments):
16 """open: Open the specified object(s)
17 Required argument: list of objects to open
18 Keyword argument _attributes: AppleEvent attribute dictionary
19 """
20 _code = 'aevt'
21 _subcode = 'odoc'
23 if _arguments: raise TypeError, 'No optional args expected'
24 _arguments['----'] = _object
27 _reply, _arguments, _attributes = self.send(_code, _subcode,
28 _arguments, _attributes)
29 if _arguments.has_key('errn'):
30 raise aetools.Error, aetools.decodeerror(_arguments)
31 # XXXX Optionally decode result
32 if _arguments.has_key('----'):
33 return _arguments['----']
35 def _print(self, _object, _attributes={}, **_arguments):
36 """print: Print the specified object(s)
37 Required argument: list of objects to print
38 Keyword argument _attributes: AppleEvent attribute dictionary
39 """
40 _code = 'aevt'
41 _subcode = 'pdoc'
43 if _arguments: raise TypeError, 'No optional args expected'
44 _arguments['----'] = _object
47 _reply, _arguments, _attributes = self.send(_code, _subcode,
48 _arguments, _attributes)
49 if _arguments.has_key('errn'):
50 raise aetools.Error, aetools.decodeerror(_arguments)
51 # XXXX Optionally decode result
52 if _arguments.has_key('----'):
53 return _arguments['----']
55 def quit(self, _no_object=None, _attributes={}, **_arguments):
56 """quit: Quit application
57 Keyword argument _attributes: AppleEvent attribute dictionary
58 """
59 _code = 'aevt'
60 _subcode = 'quit'
62 if _arguments: raise TypeError, 'No optional args expected'
63 if _no_object != None: raise TypeError, 'No direct arg expected'
66 _reply, _arguments, _attributes = self.send(_code, _subcode,
67 _arguments, _attributes)
68 if _arguments.has_key('errn'):
69 raise aetools.Error, aetools.decodeerror(_arguments)
70 # XXXX Optionally decode result
71 if _arguments.has_key('----'):
72 return _arguments['----']
74 def run(self, _no_object=None, _attributes={}, **_arguments):
75 """run: Sent to an application when it is double-clicked
76 Keyword argument _attributes: AppleEvent attribute dictionary
77 """
78 _code = 'aevt'
79 _subcode = 'oapp'
81 if _arguments: raise TypeError, 'No optional args expected'
82 if _no_object != None: raise TypeError, 'No direct arg expected'
85 _reply, _arguments, _attributes = self.send(_code, _subcode,
86 _arguments, _attributes)
87 if _arguments.has_key('errn'):
88 raise aetools.Error, aetools.decodeerror(_arguments)
89 # XXXX Optionally decode result
90 if _arguments.has_key('----'):
91 return _arguments['----']
95 # Indices of types declared in this module
97 _classdeclarations = {
100 _propdeclarations = {
103 _compdeclarations = {
106 _enumdeclarations = {