summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-24 14:31:33 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-24 14:31:33 (GMT)
commit6f376c40317e693c5eea0356fbb90d7394f21ff0 (patch)
treeb787fddfb1173c1045d3c9e622b255754ab5eb49 /Lib
parentfa0054aa732176a1f9b1c79cd20198f43cfed334 (diff)
downloadcpython-6f376c40317e693c5eea0356fbb90d7394f21ff0.zip
cpython-6f376c40317e693c5eea0356fbb90d7394f21ff0.tar.gz
cpython-6f376c40317e693c5eea0356fbb90d7394f21ff0.tar.bz2
Enable new I/O. Disable creation of old files.
Lots of stuff fails now, including -S and -m command line flags.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/site.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/site.py b/Lib/site.py
index 0871579..e00890e 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -403,19 +403,13 @@ def execsitecustomize():
def installnewio():
- """Install new I/O library as default.
-
- This is only done if $PYTHONNEWIO is set and non-empty.
- """
- if not os.getenv("PYTHONNEWIO"):
- return
+ """Install new I/O library as default."""
import io
# Trick so that open won't become a bound method when stored
# as a class variable (as dumbdbm does)
class open:
def __new__(cls, *args, **kwds):
return io.open(*args, **kwds)
- __builtin__.classic_open = __builtin__.open
__builtin__.open = open
sys.stdin = io.open(0, "r")
sys.stdout = io.open(1, "w")