Fix three PyChecker-detected gotchas.
[python/dscho.git] / Mac / Lib / lib-scriptpackages / CodeWarrior / Required.py
blob53109da4a08e9b746b900d7dd60f4a8d820c4339
1 """Suite Required: Terms that every application should support
2 Level 1, version 1
4 Generated from Macintosh HD:SWdev:CodeWarrior 6 MPTP:Metrowerks CodeWarrior:CodeWarrior IDE 4.1B9
5 AETE/AEUT resource version 1/0, language 0, script 0
6 """
8 import aetools
9 import MacOS
11 _code = 'reqd'
13 from StdSuites.Required_Suite import *
14 class Required_Events(Required_Suite_Events):
16 _argmap_open = {
17 'converting' : 'Conv',
20 def open(self, _object, _attributes={}, **_arguments):
21 """open: Open the specified object(s)
22 Required argument: list of objects to open
23 Keyword argument converting: Whether to convert project to latest version (yes/no; default is ask).
24 Keyword argument _attributes: AppleEvent attribute dictionary
25 """
26 _code = 'aevt'
27 _subcode = 'odoc'
29 aetools.keysubst(_arguments, self._argmap_open)
30 _arguments['----'] = _object
32 aetools.enumsubst(_arguments, 'Conv', _Enum_Conv)
34 _reply, _arguments, _attributes = self.send(_code, _subcode,
35 _arguments, _attributes)
36 if _arguments.has_key('errn'):
37 raise aetools.Error, aetools.decodeerror(_arguments)
38 # XXXX Optionally decode result
39 if _arguments.has_key('----'):
40 return _arguments['----']
42 _Enum_Conv = {
43 'yes' : 'yes ', # Convert the project if necessary on open
44 'no' : 'no ', # Do not convert the project if needed on open
49 # Indices of types declared in this module
51 _classdeclarations = {
54 _propdeclarations = {
57 _compdeclarations = {
60 _enumdeclarations = {
61 'Conv' : _Enum_Conv,