""" myreadline.py -- Readline wrapper and additions for linux +python <= 2.3 """ # shula-zaurus __version__ = "1.0" import sys, os from readline import * try: tmp=delete_item_from_history except: def delete_item_from_history(cmd): pass #implemented only on python >= 2.4 if sys.platform in ['linux', 'linux2']: def readline(step = 0, maxlen = 0, history = 0, histfile = 0, prompt='> '): """readline(step, maxlen, history, histfile) Read a line from the console. step: Number of columns to side-scroll per step. maxlen: Maximum length of string to read. history: List of strings comprising the current history. histfile: History file name (for saving history), None to disable. on linux, python <= 2.3 (zaurus only?), uses the raw-input, no special history mngmnt """ return raw_input(prompt)