1.1 --- a/lib/__builtins__/io.py Tue Nov 15 22:55:57 2016 +0100
1.2 +++ b/lib/__builtins__/io.py Tue Nov 15 22:57:58 2016 +0100
1.3 @@ -20,7 +20,6 @@
1.4 """
1.5
1.6 from native import _read, _write
1.7 -from sys import stdout
1.8
1.9 class sysfile:
1.10
1.11 @@ -62,6 +61,12 @@
1.12 'nl' is given as a true value.
1.13 """
1.14
1.15 + # Import locally to ensure that the object is initialised.
1.16 + # Otherwise, if imported at the module level, the sys module may not have
1.17 + # been set up.
1.18 +
1.19 + from sys import stdout
1.20 +
1.21 # Write to standard output if dest is not specified.
1.22
1.23 dest = dest or stdout