home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 May / maximum-cd-2010-05.iso / DiscContents / boxee-0.9.20.10711.exe / system / python / Lib / plat-mac / lib-scriptpackages / SystemEvents / Power_Suite.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-07-20  |  4.5 KB  |  133 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.4)
  3.  
  4. '''Suite Power Suite: Terms and Events for controlling System power
  5. Level 1, version 1
  6.  
  7. Generated from /System/Library/CoreServices/System Events.app
  8. AETE/AEUT resource version 1/0, language 0, script 0
  9. '''
  10. import aetools
  11. import MacOS
  12. _code = 'powr'
  13.  
  14. class Power_Suite_Events:
  15.     
  16.     def restart(self, _object, _attributes = { }, **_arguments):
  17.         '''restart: Restart the computer
  18.         Required argument: the object for the command
  19.         Keyword argument _attributes: AppleEvent attribute dictionary
  20.         '''
  21.         _code = 'fndr'
  22.         _subcode = 'rest'
  23.         if _arguments:
  24.             raise TypeError, 'No optional args expected'
  25.         
  26.         _arguments['----'] = _object
  27.         (_reply, _arguments, _attributes) = self.send(_code, _subcode, _arguments, _attributes)
  28.         if _arguments.get('errn', 0):
  29.             raise aetools.Error, aetools.decodeerror(_arguments)
  30.         
  31.         if _arguments.has_key('----'):
  32.             return _arguments['----']
  33.         
  34.  
  35.     
  36.     def shut_down(self, _object, _attributes = { }, **_arguments):
  37.         '''shut down: Shut Down the computer
  38.         Required argument: the object for the command
  39.         Keyword argument _attributes: AppleEvent attribute dictionary
  40.         '''
  41.         _code = 'fndr'
  42.         _subcode = 'shut'
  43.         if _arguments:
  44.             raise TypeError, 'No optional args expected'
  45.         
  46.         _arguments['----'] = _object
  47.         (_reply, _arguments, _attributes) = self.send(_code, _subcode, _arguments, _attributes)
  48.         if _arguments.get('errn', 0):
  49.             raise aetools.Error, aetools.decodeerror(_arguments)
  50.         
  51.         if _arguments.has_key('----'):
  52.             return _arguments['----']
  53.         
  54.  
  55.     
  56.     def sleep(self, _object, _attributes = { }, **_arguments):
  57.         '''sleep: Put the computer to sleep
  58.         Required argument: the object for the command
  59.         Keyword argument _attributes: AppleEvent attribute dictionary
  60.         '''
  61.         _code = 'fndr'
  62.         _subcode = 'slep'
  63.         if _arguments:
  64.             raise TypeError, 'No optional args expected'
  65.         
  66.         _arguments['----'] = _object
  67.         (_reply, _arguments, _attributes) = self.send(_code, _subcode, _arguments, _attributes)
  68.         if _arguments.get('errn', 0):
  69.             raise aetools.Error, aetools.decodeerror(_arguments)
  70.         
  71.         if _arguments.has_key('----'):
  72.             return _arguments['----']
  73.         
  74.  
  75.  
  76.  
  77. class application(aetools.ComponentItem):
  78.     '''application - The System Events application '''
  79.     want = 'capp'
  80.  
  81.  
  82. class _Prop__3c_Inheritance_3e_(aetools.NProperty):
  83.     '''<Inheritance> - All of the properties of the superclass. '''
  84.     which = 'c@#^'
  85.     want = 'capp'
  86.  
  87. _3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
  88.  
  89. class _Prop_folder_actions_enabled(aetools.NProperty):
  90.     '''folder actions enabled - Are Folder Actions currently being processed? '''
  91.     which = 'faen'
  92.     want = 'bool'
  93.  
  94. folder_actions_enabled = _Prop_folder_actions_enabled()
  95.  
  96. class _Prop_properties(aetools.NProperty):
  97.     '''properties - every property of the System Events application '''
  98.     which = 'pALL'
  99.     want = '****'
  100.  
  101. properties = _Prop_properties()
  102. applications = application
  103. application._superclassnames = []
  104. import Disk_Folder_File_Suite
  105. import Standard_Suite
  106. import Folder_Actions_Suite
  107. import Login_Items_Suite
  108. import Processes_Suite
  109. application._privpropdict = {
  110.     '_3c_Inheritance_3e_': _Prop__3c_Inheritance_3e_,
  111.     'folder_actions_enabled': _Prop_folder_actions_enabled,
  112.     'properties': _Prop_properties }
  113. application._privelemdict = {
  114.     'application_process': Processes_Suite.application_process,
  115.     'desk_accessory_process': Processes_Suite.desk_accessory_process,
  116.     'disk': Disk_Folder_File_Suite.disk,
  117.     'document': Standard_Suite.document,
  118.     'file': Disk_Folder_File_Suite.file,
  119.     'folder': Disk_Folder_File_Suite.folder,
  120.     'folder_action': Folder_Actions_Suite.folder_action,
  121.     'item': Disk_Folder_File_Suite.item,
  122.     'login_item': Login_Items_Suite.login_item,
  123.     'process': Processes_Suite.process,
  124.     'window': Standard_Suite.window }
  125. _classdeclarations = {
  126.     'capp': application }
  127. _propdeclarations = {
  128.     'c@#^': _Prop__3c_Inheritance_3e_,
  129.     'faen': _Prop_folder_actions_enabled,
  130.     'pALL': _Prop_properties }
  131. _compdeclarations = { }
  132. _enumdeclarations = { }
  133.