1.1 --- a/lib/__builtins__/io.py Sat Jan 07 00:23:19 2017 +0100
1.2 +++ b/lib/__builtins__/io.py Sat Jan 07 16:23:25 2017 +0100
1.3 @@ -19,9 +19,21 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 +from sys import lstdin, stdout
1.8 +
1.9 open = file
1.10
1.11 -def raw_input(prompt=None): pass
1.12 +def raw_input(prompt=None):
1.13 +
1.14 + """
1.15 + Write any specified 'prompt' to standard output and read text from standard
1.16 + input.
1.17 + """
1.18 +
1.19 + if prompt:
1.20 + stdout.write(prompt)
1.21 +
1.22 + return lstdin.readline()
1.23
1.24 def print_(dest, args, nl):
1.25
1.26 @@ -30,12 +42,6 @@
1.27 'nl' is given as a true value.
1.28 """
1.29
1.30 - # If imported at the module level, the sys module must be set up first,
1.31 - # which should be ensured by the module ordering activity, and a module
1.32 - # attribute will be employed to hold a reference to sys.stdout.
1.33 -
1.34 - from sys import stdout
1.35 -
1.36 # Write to standard output if dest is not specified.
1.37
1.38 dest = dest or stdout