diff options
| author | Jack Jansen <jack.jansen@cwi.nl> | 2000-09-22 23:26:55 (GMT) |
|---|---|---|
| committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-09-22 23:26:55 (GMT) |
| commit | 07642c3689edaaf04addb0853877bbd0938ecf7b (patch) | |
| tree | 8fb5b6a08ae4f4ca6a7ae3912ce3829986c1071a /Mac/Lib/mkcwproject/cwtalker.py | |
| parent | 7760cff29489fef6728ef7776d76fcc7b41c2488 (diff) | |
| download | cpython-07642c3689edaaf04addb0853877bbd0938ecf7b.zip cpython-07642c3689edaaf04addb0853877bbd0938ecf7b.tar.gz cpython-07642c3689edaaf04addb0853877bbd0938ecf7b.tar.bz2 | |
More bits and pieces of project generation.
Diffstat (limited to 'Mac/Lib/mkcwproject/cwtalker.py')
| -rw-r--r-- | Mac/Lib/mkcwproject/cwtalker.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Mac/Lib/mkcwproject/cwtalker.py b/Mac/Lib/mkcwproject/cwtalker.py new file mode 100644 index 0000000..fbce620 --- /dev/null +++ b/Mac/Lib/mkcwproject/cwtalker.py @@ -0,0 +1,26 @@ +import CodeWarrior + +class MyCodeWarrior(CodeWarrior.CodeWarrior): + # Bug in the CW OSA dictionary + def export(self, object, _attributes={}, **_arguments): + """export: Export the project file as an XML file + Keyword argument _in: the XML file in which to export the project + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'CWIE' + _subcode = 'EXPT' + + aetools.keysubst(_arguments, self._argmap_export) + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.has_key('errn'): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + def my_mkproject(self, prjfile, xmlfile): + self.make(new=CodeWarrior.project_document, with_data=xmlfile, at=prjfile) |
