[Python-3000-checkins] r59154 - python/branches/py3k/Parser/asdl_c.py
guido.van.rossum
python-3000-checkins at python.org
Fri Nov 23 22:26:49 CET 2007
Author: guido.van.rossum
Date: Fri Nov 23 22:26:49 2007
New Revision: 59154
Modified:
python/branches/py3k/Parser/asdl_c.py
Log:
Open output files in text mode, after all they are text files.
(Binary mode caused problems when "python" was 3.0.)
Modified: python/branches/py3k/Parser/asdl_c.py
==============================================================================
--- python/branches/py3k/Parser/asdl_c.py (original)
+++ python/branches/py3k/Parser/asdl_c.py Fri Nov 23 22:26:49 2007
@@ -741,7 +741,7 @@
sys.exit(1)
if INC_DIR:
p = "%s/%s-ast.h" % (INC_DIR, mod.name)
- f = open(p, "wb")
+ f = open(p, "w")
f.write(auto_gen_msg)
f.write('#include "asdl.h"\n\n')
c = ChainOfVisitors(TypeDefVisitor(f),
@@ -754,7 +754,7 @@
if SRC_DIR:
p = os.path.join(SRC_DIR, str(mod.name) + "-ast.c")
- f = open(p, "wb")
+ f = open(p, "w")
f.write(auto_gen_msg)
f.write(c_file_msg % parse_version(mod))
f.write('#include "Python.h"\n')
More information about the Python-3000-checkins
mailing list