Remove all definitions of raw_input() that were still scattered throughout the docs

from the time where there was neither input() nor raw_input().
This commit is contained in:
Georg Brandl 2007-12-02 22:48:17 +00:00
parent 2b1c592d22
commit 8d5c39240e
6 changed files with 8 additions and 37 deletions

View file

@ -104,16 +104,11 @@ Template subclasses can specify a custom delimiter. For example, a batch
renaming utility for a photo browser may elect to use percent signs for
placeholders such as the current date, image sequence number, or file format::
>>> import time, os.path, sys
>>> def raw_input(prompt):
... sys.stdout.write(prompt)
... sys.stdout.flush()
... return sys.stdin.readline()
...
>>> import time, os.path
>>> photofiles = ['img_1074.jpg', 'img_1076.jpg', 'img_1077.jpg']
>>> class BatchRename(Template):
... delimiter = '%'
>>> fmt = raw_input('Enter rename style (%d-date %n-seqnum %f-format): ')
>>> fmt = input('Enter rename style (%d-date %n-seqnum %f-format): ')
Enter rename style (%d-date %n-seqnum %f-format): Ashley_%n%f
>>> t = BatchRename(fmt)