[Python-3000-checkins] r55590 - python/branches/py3k-struni/Lib/distutils/sysconfig.py python/branches/py3k-struni/Lib/distutils/text_file.py
guido.van.rossum
python-3000-checkins at python.org
Fri May 25 20:39:34 CEST 2007
Author: guido.van.rossum
Date: Fri May 25 20:39:29 2007
New Revision: 55590
Modified:
python/branches/py3k-struni/Lib/distutils/sysconfig.py
python/branches/py3k-struni/Lib/distutils/text_file.py
Log:
Minimal fixes to save the bootstrap on OSX.
Modified: python/branches/py3k-struni/Lib/distutils/sysconfig.py
==============================================================================
--- python/branches/py3k-struni/Lib/distutils/sysconfig.py (original)
+++ python/branches/py3k-struni/Lib/distutils/sysconfig.py Fri May 25 20:39:29 2007
@@ -11,6 +11,7 @@
__revision__ = "$Id$"
+import io
import os
import re
import sys
@@ -353,7 +354,7 @@
# load the installed pyconfig.h:
try:
filename = get_config_h_filename()
- parse_config_h(open(filename), g)
+ parse_config_h(io.open(filename), g)
except IOError as msg:
my_msg = "invalid Python installation: unable to open %s" % filename
if hasattr(msg, "strerror"):
Modified: python/branches/py3k-struni/Lib/distutils/text_file.py
==============================================================================
--- python/branches/py3k-struni/Lib/distutils/text_file.py (original)
+++ python/branches/py3k-struni/Lib/distutils/text_file.py Fri May 25 20:39:29 2007
@@ -7,7 +7,7 @@
__revision__ = "$Id$"
from types import *
-import sys, os
+import sys, os, io
class TextFile:
@@ -34,7 +34,7 @@
something that provides 'readline()' and 'close()' methods). It is
recommended that you supply at least 'filename', so that TextFile
can include it in warning messages. If 'file' is not supplied,
- TextFile creates its own using the 'open()' builtin.
+ TextFile creates its own using 'io.open()'.
The options are all boolean, and affect the value returned by
'readline()':
@@ -118,7 +118,7 @@
'filename' and 'file' arguments to the constructor."""
self.filename = filename
- self.file = open (self.filename, 'r')
+ self.file = io.open (self.filename, 'r')
self.current_line = 0
More information about the Python-3000-checkins
mailing list