*** /opt/local/lib/python2.0/cmd.py Tue Feb 6 04:26:20 2001 --- cmd.py Mon Mar 5 07:07:20 2001 *************** *** 35,41 **** they automatically support Emacs-like command history and editing features. """ ! import string PROMPT = '(Cmd) ' IDENTCHARS = string.letters + string.digits + '_' --- 35,41 ---- they automatically support Emacs-like command history and editing features. """ ! import string, sys PROMPT = '(Cmd) ' IDENTCHARS = string.letters + string.digits + '_' *************** *** 52,57 **** --- 52,58 ---- misc_header = "Miscellaneous help topics:" undoc_header = "Undocumented commands:" nohelp = "*** No help on %s" + use_rawinput = 1 def __init__(self): pass *************** *** 68,74 **** del self.cmdqueue[0] else: try: ! line = raw_input(self.prompt) except EOFError: line = 'EOF' line = self.precmd(line) --- 69,81 ---- del self.cmdqueue[0] else: try: ! if self.use_rawinput: ! line = raw_input(self.prompt) ! else: ! sys.stdout.write(self.prompt) ! line = sys.stdin.readline() ! if not len(line): line = 'EOF' ! else: line = line[:-1] # chop \n except EOFError: line = 'EOF' line = self.precmd(line)