diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-28 22:07:22 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-28 22:07:22 (GMT) |
commit | 7377bec6ae20e2a3b83f7084bc98af47e5bd3886 (patch) | |
tree | fef9adf10767b4f12a5918345a392cda9eb67f04 /Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py | |
parent | 03b9c91afff90cd8ac2e0b84f486d0f2ebf4e549 (diff) | |
download | cpython-7377bec6ae20e2a3b83f7084bc98af47e5bd3886.zip cpython-7377bec6ae20e2a3b83f7084bc98af47e5bd3886.tar.gz cpython-7377bec6ae20e2a3b83f7084bc98af47e5bd3886.tar.bz2 |
Regenerated (from resource files) with sorting version of gensuitemodule.
This is a first step towards regenerating the modules with newer, MacOSX,
versions of these programs, and using the programmatic interface to
get at the terminology in stead of poking in resource files.
Diffstat (limited to 'Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py')
-rw-r--r-- | Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py b/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py index 0f62956..ec064ee 100644 --- a/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py @@ -12,15 +12,17 @@ _code = 'trmx' class Terminal_Suite_Events: - def run(self, _no_object=None, _attributes={}, **_arguments): - """run: Run the Terminal application + def count(self, _object=None, _attributes={}, **_arguments): + """count: Return the number of elements of a particular class within an object + Required argument: a reference to the objects to be counted Keyword argument _attributes: AppleEvent attribute dictionary + Returns: the number of objects counted """ - _code = 'aevt' - _subcode = 'oapp' + _code = 'core' + _subcode = 'cnte' if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, @@ -31,15 +33,23 @@ class Terminal_Suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def quit(self, _no_object=None, _attributes={}, **_arguments): - """quit: Quit the Terminal application + _argmap_do_script = { + 'with_command' : 'cmnd', + 'in_' : 'kfil', + } + + def do_script(self, _object, _attributes={}, **_arguments): + """do script: Run a UNIX shell script or command + Required argument: data to be passed to the Terminal application as the command line + Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter + Keyword argument in_: the window in which to execute the command Keyword argument _attributes: AppleEvent attribute dictionary """ - _code = 'aevt' - _subcode = 'quit' + _code = 'core' + _subcode = 'dosc' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + aetools.keysubst(_arguments, self._argmap_do_script) + _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, @@ -50,17 +60,15 @@ class Terminal_Suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def count(self, _object=None, _attributes={}, **_arguments): - """count: Return the number of elements of a particular class within an object - Required argument: a reference to the objects to be counted + def quit(self, _no_object=None, _attributes={}, **_arguments): + """quit: Quit the Terminal application Keyword argument _attributes: AppleEvent attribute dictionary - Returns: the number of objects counted """ - _code = 'core' - _subcode = 'cnte' + _code = 'aevt' + _subcode = 'quit' if _arguments: raise TypeError, 'No optional args expected' - _arguments['----'] = _object + if _no_object != None: raise TypeError, 'No direct arg expected' _reply, _arguments, _attributes = self.send(_code, _subcode, @@ -71,23 +79,15 @@ class Terminal_Suite_Events: if _arguments.has_key('----'): return _arguments['----'] - _argmap_do_script = { - 'with_command' : 'cmnd', - 'in_' : 'kfil', - } - - def do_script(self, _object, _attributes={}, **_arguments): - """do script: Run a UNIX shell script or command - Required argument: data to be passed to the Terminal application as the command line - Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter - Keyword argument in_: the window in which to execute the command + def run(self, _no_object=None, _attributes={}, **_arguments): + """run: Run the Terminal application Keyword argument _attributes: AppleEvent attribute dictionary """ - _code = 'core' - _subcode = 'dosc' + _code = 'aevt' + _subcode = 'oapp' - aetools.keysubst(_arguments, self._argmap_do_script) - _arguments['----'] = _object + if _arguments: raise TypeError, 'No optional args expected' + if _no_object != None: raise TypeError, 'No direct arg expected' _reply, _arguments, _attributes = self.send(_code, _subcode, |