mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Get rid of a bunch more raw_input references
This commit is contained in:
parent
9e2b9665ae
commit
ce96f69d69
42 changed files with 222 additions and 144 deletions
10
Lib/cmd.py
10
Lib/cmd.py
|
@ -40,18 +40,20 @@ The data members `self.doc_header', `self.misc_header', and
|
|||
`self.undoc_header' set the headers used for the help function's
|
||||
listings of documented functions, miscellaneous topics, and undocumented
|
||||
functions respectively.
|
||||
|
||||
These interpreters use raw_input; thus, if the readline module is loaded,
|
||||
they automatically support Emacs-like command history and editing features.
|
||||
"""
|
||||
|
||||
import string
|
||||
import string, sys
|
||||
|
||||
__all__ = ["Cmd"]
|
||||
|
||||
PROMPT = '(Cmd) '
|
||||
IDENTCHARS = string.ascii_letters + string.digits + '_'
|
||||
|
||||
def raw_input(prompt):
|
||||
sys.stdout.write(prompt)
|
||||
sys.stdout.flush()
|
||||
return sys.stdin.readline()
|
||||
|
||||
class Cmd:
|
||||
"""A simple framework for writing line-oriented command interpreters.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue