summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-11-23 21:26:49 (GMT)
committerGuido van Rossum <guido@python.org>2007-11-23 21:26:49 (GMT)
commit2af1d894e3e8fea6b84b4229ef15be8d422b718d (patch)
tree2e68fd4942accc0923460c08b3bcaddccd89b775 /Parser
parentad3562ed631677a3f92a3b75259d96749c1927ac (diff)
downloadcpython-2af1d894e3e8fea6b84b4229ef15be8d422b718d.zip
cpython-2af1d894e3e8fea6b84b4229ef15be8d422b718d.tar.gz
cpython-2af1d894e3e8fea6b84b4229ef15be8d422b718d.tar.bz2
Open output files in text mode, after all they are text files.
(Binary mode caused problems when "python" was 3.0.)
Diffstat (limited to 'Parser')
-rwxr-xr-xParser/asdl_c.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 798650d..24b732c 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -741,7 +741,7 @@ def main(srcfile):
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 @@ def main(srcfile):
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')