summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/site.py')
-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")