Package PyFoam :: Package ThirdParty :: Package Gnuplot :: Module gnuplot_Suites
[hide private]
[frames] | no frames]

Source Code for Module PyFoam.ThirdParty.Gnuplot.gnuplot_Suites

  1  # $Id: gnuplot_Suites.py 292 2006-03-03 09:49:04Z mhagger $ 
  2   
  3  # This file is provided as part of the Gnuplot.py package for the 
  4  # convenience of Mac users.  It was generated primarily using gensuitemodule 
  5  # with Mac gnuplot 3.7.1a.  Thanks to Anthony M. Ingraldi and Noboru Yamamoto 
  6  # for helping with this. 
  7   
  8  # file contains 
  9  # 
 10  #  class gnuplot_Suite 
 11  #  class odds_and_ends 
 12  #  class Standard_Suite 
 13  #  class Miscellaneous_Events 
 14  # 
 15  """Suite gnuplot Suite: Events supplied by gnuplot 
 16  Level 1, version 1 
 17   
 18  Generated from Alpha:Desktop Folder:gnuplot.1:gnuplot 3.7.1a 
 19  AETE/AEUT resource version 1/0, language 0, script 0 
 20  """ 
 21   
 22  import aetools 
 23  import MacOS 
 24   
 25  _code = 'GPSE' 
 26   
27 -class gnuplot_Suite:
28
29 - def gnuexec(self, _object=None, _attributes={}, **_arguments):
30 """exec: execute a gnuplot command 31 Required argument: gnuplot command 32 Keyword argument _attributes: AppleEvent attribute dictionary 33 """ 34 _code = 'GPSE' 35 _subcode = 'exec' 36 37 if _arguments: raise TypeError, 'No optional args expected' 38 _arguments['----'] = _object 39 40 41 _reply, _arguments, _attributes = self.send(_code, _subcode, 42 _arguments, _attributes) 43 if _arguments.has_key('errn'): 44 raise aetools.Error, aetools.decodeerror(_arguments) 45 # XXXX Optionally decode result 46 if _arguments.has_key('----'): 47 return _arguments['----']
48
49 - def plot(self, _object=None, _attributes={}, **_arguments):
50 """plot: create a 2-D plot 51 52 53 Required argument: data to be plotted 54 Keyword argument _attributes: AppleEvent attribute dictionary 55 """ 56 _code = 'GPLT' 57 _subcode = 'plot' 58 59 if _arguments: raise TypeError, 'No optional args expected' 60 _arguments['----'] = _object 61 62 63 _reply, _arguments, _attributes = self.send(_code, _subcode, 64 _arguments, _attributes) 65 if _arguments.has_key('errn'): 66 raise aetools.Error, aetools.decodeerror(_arguments) 67 # XXXX Optionally decode result 68 if _arguments.has_key('----'): 69 return _arguments['----']
70
71 - def splot(self, _object=None, _attributes={}, **_arguments):
72 """splot: create a 3-D plot 73 Required argument: data to be plotted 74 Keyword argument _attributes: AppleEvent attribute dictionary 75 """ 76 _code = 'GPLT' 77 _subcode = 'splt' 78 79 if _arguments: raise TypeError, 'No optional args expected' 80 _arguments['----'] = _object 81 82 83 _reply, _arguments, _attributes = self.send(_code, _subcode, 84 _arguments, _attributes) 85 if _arguments.has_key('errn'): 86 raise aetools.Error, aetools.decodeerror(_arguments) 87 # XXXX Optionally decode result 88 if _arguments.has_key('----'): 89 return _arguments['----']
90 91
92 -class graph(aetools.ComponentItem):
93 """graph - graph - a subclass of window""" 94 want = 'cGRF'
95 -class picture(aetools.NProperty):
96 """picture - gnuplot graph in "PICT" format""" 97 which = 'PICT' 98 want = 'PICT'
99 graph._propdict = { 100 'picture' : picture, 101 } 102 graph._elemdict = { 103 } 104 _Enum_lyty = { 105 'line' : 'typ1', # line 106 'points' : 'typ2', # points 107 'impulses' : 'typ3', # impulses 108 'linespoints' : 'typ4', # linespoints 109 'dots' : 'typ5', # dots 110 'steps' : 'typ6', # steps 111 'fsteps' : 'typ7', # fsteps 112 'errorbars' : 'typ8', # errorbars 113 'xerrorbars' : 'typ9', # xerrorbars 114 'yerrorbars' : 'ty10', # yerrorbars 115 'xyerrorbars' : 'ty11', # xyerrorbars 116 'boxes' : 'ty12', # boxes 117 'boxerrorbars' : 'ty13', # boxerrorbars 118 'boxxyerrorbars' : 'ty14', # boxxyerrorbars 119 'vector' : 'ty19', # vector 120 } 121 122 123 # 124 # Indices of types declared in this module 125 # 126 _classdeclarations = { 127 'cGRF' : graph, 128 } 129 130 _propdeclarations = { 131 'PICT' : picture, 132 } 133 134 _compdeclarations = { 135 } 136 137 _enumdeclarations = { 138 'lyty' : _Enum_lyty, 139 } 140 141 142 """Suite odds and ends: Things that should be in some standard suite, but arenÕt 143 Level 1, version 1 144 145 Generated from Alpha:Desktop Folder:gnuplot.1:gnuplot 3.7.1a 146 AETE/AEUT resource version 1/0, language 0, script 0 147 """ 148 149 import aetools 150 import MacOS 151 152 _code = 'Odds' 153
154 -class odds_and_ends:
155
156 - def select(self, _object=None, _attributes={}, **_arguments):
157 """select: Select the specified object 158 Required argument: the object to select 159 Keyword argument _attributes: AppleEvent attribute dictionary 160 """ 161 _code = 'misc' 162 _subcode = 'slct' 163 164 if _arguments: raise TypeError, 'No optional args expected' 165 _arguments['----'] = _object 166 167 168 _reply, _arguments, _attributes = self.send(_code, _subcode, 169 _arguments, _attributes) 170 if _arguments.has_key('errn'): 171 raise aetools.Error, aetools.decodeerror(_arguments) 172 # XXXX Optionally decode result 173 if _arguments.has_key('----'): 174 return _arguments['----']
175 176 177 # 178 # Indices of types declared in this module 179 # 180 _classdeclarations = { 181 } 182 183 _propdeclarations = { 184 } 185 186 _compdeclarations = { 187 } 188 189 _enumdeclarations = { 190 } 191 192 """Suite Standard Suite: Common terms for most applications 193 Level 1, version 1 194 195 Generated from Alpha:Desktop Folder:gnuplot.1:gnuplot 3.7.1a 196 AETE/AEUT resource version 1/0, language 0, script 0 197 """ 198 199 import aetools 200 import MacOS 201 202 _code = 'CoRe' 203
204 -class Standard_Suite:
205 206 _argmap_close = { 207 'saving' : 'savo', 208 '_in' : 'kfil', 209 } 210
211 - def close(self, _object, _attributes={}, **_arguments):
212 """close: Close an object 213 Required argument: the objects to close 214 Keyword argument saving: specifies whether or not changes should be saved before closing 215 Keyword argument _in: the file in which to save the object 216 Keyword argument _attributes: AppleEvent attribute dictionary 217 """ 218 _code = 'core' 219 _subcode = 'clos' 220 221 aetools.keysubst(_arguments, self._argmap_close) 222 _arguments['----'] = _object 223 224 aetools.enumsubst(_arguments, 'savo', _Enum_savo) 225 226 _reply, _arguments, _attributes = self.send(_code, _subcode, 227 _arguments, _attributes) 228 if _arguments.has_key('errn'): 229 raise aetools.Error, aetools.decodeerror(_arguments) 230 # XXXX Optionally decode result 231 if _arguments.has_key('----'): 232 return _arguments['----']
233
234 - def data_size(self, _object, _attributes={}, **_arguments):
235 """data size: Return the size in bytes of an object 236 Required argument: the object whose data size is to be returned 237 Keyword argument _attributes: AppleEvent attribute dictionary 238 Returns: the size of the object in bytes 239 """ 240 _code = 'core' 241 _subcode = 'dsiz' 242 243 if _arguments: raise TypeError, 'No optional args expected' 244 _arguments['----'] = _object 245 246 247 _reply, _arguments, _attributes = self.send(_code, _subcode, 248 _arguments, _attributes) 249 if _arguments.has_key('errn'): 250 raise aetools.Error, aetools.decodeerror(_arguments) 251 # XXXX Optionally decode result 252 if _arguments.has_key('----'): 253 return _arguments['----']
254
255 - def get(self, _object, _attributes={}, **_arguments):
256 """get: Get the data for an object 257 Required argument: the object whose data is to be returned 258 Keyword argument _attributes: AppleEvent attribute dictionary 259 Returns: The data from the object 260 """ 261 _code = 'core' 262 _subcode = 'getd' 263 264 if _arguments: raise TypeError, 'No optional args expected' 265 _arguments['----'] = _object 266 267 268 _reply, _arguments, _attributes = self.send(_code, _subcode, 269 _arguments, _attributes) 270 if _arguments.has_key('errn'): 271 raise aetools.Error, aetools.decodeerror(_arguments) 272 # XXXX Optionally decode result 273 if _arguments.has_key('----'): 274 return _arguments['----']
275 276 _argmap_make = { 277 'new' : 'kocl', 278 'at' : 'insh', 279 'with_data' : 'data', 280 'with_properties' : 'prdt', 281 } 282
283 - def make(self, _no_object=None, _attributes={}, **_arguments):
284 """make: Make a new element 285 Keyword argument new: the class of the new element 286 Keyword argument at: the location at which to insert the element 287 Keyword argument with_data: the initial data for the element 288 Keyword argument with_properties: the initial values for the properties of the element 289 Keyword argument _attributes: AppleEvent attribute dictionary 290 Returns: Object specifier for the new element 291 """ 292 _code = 'core' 293 _subcode = 'crel' 294 295 aetools.keysubst(_arguments, self._argmap_make) 296 if _no_object != None: raise TypeError, 'No direct arg expected' 297 298 299 _reply, _arguments, _attributes = self.send(_code, _subcode, 300 _arguments, _attributes) 301 if _arguments.has_key('errn'): 302 raise aetools.Error, aetools.decodeerror(_arguments) 303 # XXXX Optionally decode result 304 if _arguments.has_key('----'): 305 return _arguments['----']
306
307 - def open(self, _object, _attributes={}, **_arguments):
308 """open: Open the specified object(s) 309 Required argument: Objects to open. Can be a list of files or an object specifier. 310 Keyword argument _attributes: AppleEvent attribute dictionary 311 """ 312 _code = 'aevt' 313 _subcode = 'odoc' 314 315 if _arguments: raise TypeError, 'No optional args expected' 316 _arguments['----'] = _object 317 318 319 _reply, _arguments, _attributes = self.send(_code, _subcode, 320 _arguments, _attributes) 321 if _arguments.has_key('errn'): 322 raise aetools.Error, aetools.decodeerror(_arguments) 323 # XXXX Optionally decode result 324 if _arguments.has_key('----'): 325 return _arguments['----']
326
327 - def _print(self, _object, _attributes={}, **_arguments):
328 """print: Print the specified object(s) 329 Required argument: Objects to print. Can be a list of files or an object specifier. 330 Keyword argument _attributes: AppleEvent attribute dictionary 331 """ 332 _code = 'aevt' 333 _subcode = 'pdoc' 334 335 if _arguments: raise TypeError, 'No optional args expected' 336 _arguments['----'] = _object 337 338 339 _reply, _arguments, _attributes = self.send(_code, _subcode, 340 _arguments, _attributes) 341 if _arguments.has_key('errn'): 342 raise aetools.Error, aetools.decodeerror(_arguments) 343 # XXXX Optionally decode result 344 if _arguments.has_key('----'): 345 return _arguments['----']
346 347 _argmap_save = { 348 '_in' : 'kfil', 349 'as' : 'fltp', 350 } 351
352 - def save(self, _object, _attributes={}, **_arguments):
353 """save: save a set of objects 354 Required argument: Objects to save. 355 Keyword argument _in: the file in which to save the object(s) 356 Keyword argument as: the file type of the document in which to save the data 357 Keyword argument _attributes: AppleEvent attribute dictionary 358 """ 359 _code = 'core' 360 _subcode = 'save' 361 362 aetools.keysubst(_arguments, self._argmap_save) 363 _arguments['----'] = _object 364 365 366 _reply, _arguments, _attributes = self.send(_code, _subcode, 367 _arguments, _attributes) 368 if _arguments.has_key('errn'): 369 raise aetools.Error, aetools.decodeerror(_arguments) 370 # XXXX Optionally decode result 371 if _arguments.has_key('----'): 372 return _arguments['----']
373 374 _argmap_set = { 375 'to' : 'data', 376 } 377
378 - def set(self, _object, _attributes={}, **_arguments):
379 """set: Set an objectÕs data 380 Required argument: the object to change 381 Keyword argument to: the new value 382 Keyword argument _attributes: AppleEvent attribute dictionary 383 """ 384 _code = 'core' 385 _subcode = 'setd' 386 387 aetools.keysubst(_arguments, self._argmap_set) 388 _arguments['----'] = _object 389 390 391 _reply, _arguments, _attributes = self.send(_code, _subcode, 392 _arguments, _attributes) 393 if _arguments.has_key('errn'): 394 raise aetools.Error, aetools.decodeerror(_arguments) 395 # XXXX Optionally decode result 396 if _arguments.has_key('----'): 397 return _arguments['----']
398 399
400 -class application(aetools.ComponentItem):
401 """application - An application program""" 402 want = 'capp'
403 # element 'cwin' as ['indx', 'name', 'rele'] 404 # element 'docu' as ['name'] 405
406 -class window(aetools.ComponentItem):
407 """window - A Window""" 408 want = 'cwin'
409 -class bounds(aetools.NProperty):
410 """bounds - the boundary rectangle for the window""" 411 which = 'pbnd' 412 want = 'qdrt'
413 -class closeable(aetools.NProperty):
414 """closeable - Does the window have a close box?""" 415 which = 'hclb' 416 want = 'bool'
417 -class titled(aetools.NProperty):
418 """titled - Does the window have a title bar?""" 419 which = 'ptit' 420 want = 'bool'
421 -class index(aetools.NProperty):
422 """index - the number of the window""" 423 which = 'pidx' 424 want = 'long'
425 -class floating(aetools.NProperty):
426 """floating - Does the window float?""" 427 which = 'isfl' 428 want = 'bool'
433 -class resizable(aetools.NProperty):
434 """resizable - Is the window resizable?""" 435 which = 'prsz' 436 want = 'bool'
437 -class zoomable(aetools.NProperty):
438 """zoomable - Is the window zoomable?""" 439 which = 'iszm' 440 want = 'bool'
441 -class zoomed(aetools.NProperty):
442 """zoomed - Is the window zoomed?""" 443 which = 'pzum' 444 want = 'bool'
445 -class name(aetools.NProperty):
446 """name - the title of the window""" 447 which = 'pnam' 448 want = 'itxt'
449 -class visible(aetools.NProperty):
450 """visible - is the window visible?""" 451 which = 'pvis' 452 want = 'bool'
453 -class position(aetools.NProperty):
454 """position - upper left coordinates of window""" 455 which = 'ppos' 456 want = 'QDpt'
457
458 -class document(aetools.ComponentItem):
459 """document - A Document""" 460 want = 'docu'
461 # repeated property name the title of the document
462 -class modified(aetools.NProperty):
463 """modified - Has the document been modified since the last save?""" 464 which = 'imod' 465 want = 'bool'
466 application._propdict = { 467 } 468 application._elemdict = { 469 'window' : window, 470 'document' : document, 471 } 472 window._propdict = { 473 'bounds' : bounds, 474 'closeable' : closeable, 475 'titled' : titled, 476 'index' : index, 477 'floating' : floating, 478 'modal' : modal, 479 'resizable' : resizable, 480 'zoomable' : zoomable, 481 'zoomed' : zoomed, 482 'name' : name, 483 'visible' : visible, 484 'position' : position, 485 } 486 window._elemdict = { 487 } 488 document._propdict = { 489 'name' : name, 490 'modified' : modified, 491 } 492 document._elemdict = { 493 } 494 _Enum_savo = { 495 'yes' : 'yes ', # Save objects now 496 'no' : 'no ', # Do not save objects 497 'ask' : 'ask ', # Ask the user whether to save 498 } 499 500 501 # 502 # Indices of types declared in this module 503 # 504 _classdeclarations = { 505 'cwin' : window, 506 'docu' : document, 507 'capp' : application, 508 } 509 510 _propdeclarations = { 511 'ptit' : titled, 512 'pidx' : index, 513 'ppos' : position, 514 'pnam' : name, 515 'pbnd' : bounds, 516 'imod' : modified, 517 'isfl' : floating, 518 'hclb' : closeable, 519 'iszm' : zoomable, 520 'pmod' : modal, 521 'pzum' : zoomed, 522 'pvis' : visible, 523 'prsz' : resizable, 524 } 525 526 _compdeclarations = { 527 } 528 529 _enumdeclarations = { 530 'savo' : _Enum_savo, 531 } 532 533 """Suite Miscellaneous Events: Useful events that arenÕt in any other suite 534 Level 1, version 1 535 536 Generated from Alpha:Desktop Folder:gnuplot.1:gnuplot 3.7.1a 537 AETE/AEUT resource version 1/0, language 0, script 0 538 """ 539 540 import aetools 541 import MacOS 542 543 _code = 'misc' 544
545 -class Miscellaneous_Events:
546
547 - def revert(self, _object, _attributes={}, **_arguments):
548 """revert: Revert an object to the most recently saved version 549 Required argument: object to revert 550 Keyword argument _attributes: AppleEvent attribute dictionary 551 """ 552 _code = 'misc' 553 _subcode = 'rvrt' 554 555 if _arguments: raise TypeError, 'No optional args expected' 556 _arguments['----'] = _object 557 558 559 _reply, _arguments, _attributes = self.send(_code, _subcode, 560 _arguments, _attributes) 561 if _arguments.has_key('errn'): 562 raise aetools.Error, aetools.decodeerror(_arguments) 563 # XXXX Optionally decode result 564 if _arguments.has_key('----'): 565 return _arguments['----']
566
567 - def do_script(self, _object=None, _attributes={}, **_arguments):
568 """do script: execute a gnuplot script 569 Required argument: a gnuplot script 570 Keyword argument _attributes: AppleEvent attribute dictionary 571 """ 572 _code = 'misc' 573 _subcode = 'dosc' 574 575 if _arguments: raise TypeError, 'No optional args expected' 576 _arguments['----'] = _object 577 578 579 _reply, _arguments, _attributes = self.send(_code, _subcode, 580 _arguments, _attributes) 581 if _arguments.has_key('errn'): 582 raise aetools.Error, aetools.decodeerror(_arguments) 583 # XXXX Optionally decode result 584 if _arguments.has_key('----'): 585 return _arguments['----']
586 587 588 # 589 # Indices of types declared in this module 590 # 591 _classdeclarations = { 592 } 593 594 _propdeclarations = { 595 } 596 597 _compdeclarations = { 598 } 599 600 _enumdeclarations = { 601 } 602