home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- import sys
-
- try:
- from readline import *
- import readline as _rl
- have_readline = True
- except ImportError:
-
- try:
- from pyreadline import *
- import pyreadline as _rl
- have_readline = True
- except ImportError:
- have_readline = False
- except:
- None<EXCEPTION MATCH>ImportError
-
-
- None<EXCEPTION MATCH>ImportError
-
- if sys.platform == 'win32' and have_readline:
-
- try:
- _outputfile = _rl.GetOutputFile()
- except AttributeError:
- print 'Failed GetOutputFile'
- have_readline = False
- except:
- None<EXCEPTION MATCH>AttributeError
-
-
- None<EXCEPTION MATCH>AttributeError
- uses_libedit = False
- if sys.platform == 'darwin' and have_readline:
- import commands
- (status, result) = commands.getstatusoutput('otool -L %s | grep libedit' % _rl.__file__)
- if status == 0 and len(result) > 0:
- _rl.parse_and_bind('bind ^I rl_complete')
- print 'Leopard libedit detected.'
- uses_libedit = True
-
-
- if have_readline:
-
- try:
- _rl.clear_history
- except AttributeError:
-
- def clear_history():
- pass
-
- _rl.clear_history = clear_history
- except:
- None<EXCEPTION MATCH>AttributeError
-
-
- None<EXCEPTION MATCH>AttributeError
-