home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / hplip / plugins / powersettings.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2007-04-29  |  948 b   |  20 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.5)
  3.  
  4. from base.g import *
  5. from base import device
  6.  
  7. def getPowerSettings(d):
  8.     value = d.getDynamicCounter(256, False)
  9.     log.debug('Current power settings: %s' % value)
  10.     d.closePrint()
  11.     return value[6:9]
  12.  
  13.  
  14. def setPowerSettings(d, value):
  15.     log.debug('Setting power setting to %s' % value)
  16.     pcl = '\x1b%%-12345X@PJL ENTER LANGUAGE=PCL3GUI\n\x1bE\x1b%%Pmech.set_battery_autooff %s;\nudw.quit;\x1b*rC\x1bE\x1b%%-12345X' % value
  17.     d.printData(pcl, direct = True)
  18.     d.closePrint()
  19.  
  20.