summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/stdlib2.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-12-02 22:48:17 (GMT)
committerGeorg Brandl <georg@python.org>2007-12-02 22:48:17 (GMT)
commit8d5c39240e2717f751d4cba34baf4493bdcf0985 (patch)
treee261b11315d26599896ebb515d204206852d604d /Doc/tutorial/stdlib2.rst
parent2b1c592d22c16f3cb810625168ed1ce0c806d004 (diff)
downloadcpython-8d5c39240e2717f751d4cba34baf4493bdcf0985.zip
cpython-8d5c39240e2717f751d4cba34baf4493bdcf0985.tar.gz
cpython-8d5c39240e2717f751d4cba34baf4493bdcf0985.tar.bz2
Remove all definitions of raw_input() that were still scattered throughout the docs
from the time where there was neither input() nor raw_input().
Diffstat (limited to 'Doc/tutorial/stdlib2.rst')
-rw-r--r--Doc/tutorial/stdlib2.rst9
1 files changed, 2 insertions, 7 deletions
diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst
index 17fb867..4e8d37e 100644
--- a/Doc/tutorial/stdlib2.rst
+++ b/Doc/tutorial/stdlib2.rst
@@ -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)