1 """Suite Terminal Suite: Terms and Events for controlling the Terminal application
4 Generated from /Applications/Utilities/Terminal.app
5 AETE/AEUT resource version 1/0, language 0, script 0
13 class Terminal_Suite_Events
:
15 def GetURL(self
, _object
, _attributes
={}, **_arguments
):
16 """GetURL: Opens a telnet: URL
17 Required argument: the object for the command
18 Keyword argument _attributes: AppleEvent attribute dictionary
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
.get('errn', 0):
30 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
31 # XXXX Optionally decode result
32 if _arguments
.has_key('----'):
33 return _arguments
['----']
37 'with_command' : 'cmnd',
40 def do_script(self
, _object
, _attributes
={}, **_arguments
):
41 """do script: Run a UNIX shell script or command
42 Required argument: the object for the command
43 Keyword argument in_: the window in which to execute the command
44 Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter
45 Keyword argument _attributes: AppleEvent attribute dictionary
46 Returns: the reply for the command
51 aetools
.keysubst(_arguments
, self
._argmap
_do
_script
)
52 _arguments
['----'] = _object
55 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
56 _arguments
, _attributes
)
57 if _arguments
.get('errn', 0):
58 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
59 # XXXX Optionally decode result
60 if _arguments
.has_key('----'):
61 return _arguments
['----']
64 class application(aetools
.ComponentItem
):
65 """application - The Terminal program """
67 class _Prop__3c_Inheritance_3e_(aetools
.NProperty
):
68 """<Inheritance> - All of the properties of the superclass. """
71 _3c_Inheritance_3e_
= _Prop__3c_Inheritance_3e_()
72 class _Prop_properties(aetools
.NProperty
):
73 """properties - every property of the Terminal program """
76 properties
= _Prop_properties()
77 # element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
78 # element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
80 applications
= application
82 class window(aetools
.ComponentItem
):
83 """window - A Terminal window """
85 class _Prop_background_color(aetools
.NProperty
):
86 """background color - the background color for the window """
89 class _Prop_bold_text_color(aetools
.NProperty
):
90 """bold text color - the bold text color for the window """
93 class _Prop_bounds(aetools
.NProperty
):
94 """bounds - the boundary rectangle for the window, relative to the upper left corner of the screen """
97 class _Prop_busy(aetools
.NProperty
):
98 """busy - Is the window busy running a process? """
101 class _Prop_contents(aetools
.NProperty
):
102 """contents - the currently visible contents of the window """
105 class _Prop_cursor_color(aetools
.NProperty
):
106 """cursor color - the cursor color for the window """
109 class _Prop_custom_title(aetools
.NProperty
):
110 """custom title - the custom title for the window """
113 class _Prop_frame(aetools
.NProperty
):
114 """frame - the origin and size of the window """
117 class _Prop_frontmost(aetools
.NProperty
):
118 """frontmost - Is the window in front of the other Terminal windows? """
121 class _Prop_history(aetools
.NProperty
):
122 """history - the contents of the entire scrolling buffer of the window """
125 class _Prop_normal_text_color(aetools
.NProperty
):
126 """normal text color - the normal text color for the window """
129 class _Prop_number_of_columns(aetools
.NProperty
):
130 """number of columns - the number of columns in the window """
133 class _Prop_number_of_rows(aetools
.NProperty
):
134 """number of rows - the number of rows in the window """
137 class _Prop_origin(aetools
.NProperty
):
138 """origin - the lower left coordinates of the window, relative to the lower left corner of the screen """
141 class _Prop_position(aetools
.NProperty
):
142 """position - the upper left coordinates of the window, relative to the upper left corner of the screen """
145 class _Prop_processes(aetools
.NProperty
):
146 """processes - a list of the currently running processes """
149 class _Prop_size(aetools
.NProperty
):
150 """size - the width and height of the window """
153 class _Prop_title_displays_custom_title(aetools
.NProperty
):
154 """title displays custom title - Does the title for the window contain a custom title? """
157 class _Prop_title_displays_device_name(aetools
.NProperty
):
158 """title displays device name - Does the title for the window contain the device name? """
161 class _Prop_title_displays_file_name(aetools
.NProperty
):
162 """title displays file name - Does the title for the window contain the file name? """
165 class _Prop_title_displays_shell_path(aetools
.NProperty
):
166 """title displays shell path - Does the title for the window contain the shell path? """
169 class _Prop_title_displays_window_size(aetools
.NProperty
):
170 """title displays window size - Does the title for the window contain the window size? """
175 application
._superclassnames
= []
176 import Standard_Suite
177 application
._privpropdict
= {
178 '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_
,
179 'properties' : _Prop_properties
,
181 application
._privelemdict
= {
182 'document' : Standard_Suite
.document
,
185 window
._superclassnames
= []
186 window
._privpropdict
= {
187 '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_
,
188 'background_color' : _Prop_background_color
,
189 'bold_text_color' : _Prop_bold_text_color
,
190 'bounds' : _Prop_bounds
,
192 'contents' : _Prop_contents
,
193 'cursor_color' : _Prop_cursor_color
,
194 'custom_title' : _Prop_custom_title
,
195 'frame' : _Prop_frame
,
196 'frontmost' : _Prop_frontmost
,
197 'history' : _Prop_history
,
198 'normal_text_color' : _Prop_normal_text_color
,
199 'number_of_columns' : _Prop_number_of_columns
,
200 'number_of_rows' : _Prop_number_of_rows
,
201 'origin' : _Prop_origin
,
202 'position' : _Prop_position
,
203 'processes' : _Prop_processes
,
204 'properties' : _Prop_properties
,
206 'title_displays_custom_title' : _Prop_title_displays_custom_title
,
207 'title_displays_device_name' : _Prop_title_displays_device_name
,
208 'title_displays_file_name' : _Prop_title_displays_file_name
,
209 'title_displays_shell_path' : _Prop_title_displays_shell_path
,
210 'title_displays_window_size' : _Prop_title_displays_window_size
,
212 window
._privelemdict
= {
216 # Indices of types declared in this module
218 _classdeclarations
= {
219 'capp' : application
,
223 _propdeclarations
= {
225 'c@#^' : _Prop__3c_Inheritance_3e_
,
226 'ccol' : _Prop_number_of_columns
,
227 'crow' : _Prop_number_of_rows
,
228 'hist' : _Prop_history
,
229 'pALL' : _Prop_properties
,
230 'pbcl' : _Prop_background_color
,
231 'pbnd' : _Prop_bounds
,
232 'pbtc' : _Prop_bold_text_color
,
233 'pcnt' : _Prop_contents
,
234 'pcuc' : _Prop_cursor_color
,
235 'pfra' : _Prop_frame
,
236 'pisf' : _Prop_frontmost
,
237 'pori' : _Prop_origin
,
238 'ppos' : _Prop_position
,
239 'prcs' : _Prop_processes
,
241 'ptxc' : _Prop_normal_text_color
,
242 'tdct' : _Prop_title_displays_custom_title
,
243 'tddn' : _Prop_title_displays_device_name
,
244 'tdfn' : _Prop_title_displays_file_name
,
245 'tdsp' : _Prop_title_displays_shell_path
,
246 'tdws' : _Prop_title_displays_window_size
,
247 'titl' : _Prop_custom_title
,
250 _compdeclarations
= {
253 _enumdeclarations
= {