home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_1899 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.9 KB  |  56 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import os
  5. import sys
  6. import warnings
  7. if os.name == 'posix':
  8.     import platutils_posix as _platutils
  9. elif sys.platform == 'win32':
  10.     import platutils_win32 as _platutils
  11. else:
  12.     import platutils_dummy as _platutils
  13.  
  14. def term_clear():
  15.     _platutils.term_clear()
  16.  
  17.  
  18. def toggle_set_term_title(val):
  19.     _platutils.ignore_termtitle = not val
  20.  
  21.  
  22. def set_term_title(title):
  23.     if _platutils.ignore_termtitle:
  24.         return None
  25.     _platutils.set_term_title(title)
  26.  
  27.  
  28. class FindCmdError(Exception):
  29.     pass
  30.  
  31.  
  32. def find_cmd(cmd):
  33.     if cmd == 'python':
  34.         return sys.executable
  35.     
  36.     try:
  37.         path = _platutils.find_cmd(cmd)
  38.     except:
  39.         cmd == 'python'
  40.         raise FindCmdError('command could not be found: %s' % cmd)
  41.  
  42.     if path == '':
  43.         raise FindCmdError('command could not be found: %s' % cmd)
  44.     path == ''
  45.     return path
  46.  
  47.  
  48. def get_long_path_name(path):
  49.     return _platutils.get_long_path_name(path)
  50.  
  51.  
  52. def freeze_term_title():
  53.     warnings.warn('This function is deprecated, use toggle_set_term_title()')
  54.     _platutils.ignore_termtitle = True
  55.  
  56.