diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-02-25 14:31:09 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-02-25 14:31:09 (GMT) |
commit | 71219dad3e89a2f47686b4facef368980abe1f2d (patch) | |
tree | 06efca7d087b4490d3b0f1d5cf3df01a6be1d197 /PC/python33gen.py | |
parent | 7f1e174c7a0cc4e9f5ca40a22ac13f4bd53467ec (diff) | |
download | cpython-71219dad3e89a2f47686b4facef368980abe1f2d.zip cpython-71219dad3e89a2f47686b4facef368980abe1f2d.tar.gz cpython-71219dad3e89a2f47686b4facef368980abe1f2d.tar.bz2 |
More eol-style's
Diffstat (limited to 'PC/python33gen.py')
-rw-r--r-- | PC/python33gen.py | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/PC/python33gen.py b/PC/python33gen.py index b8a190a..a85f417 100644 --- a/PC/python33gen.py +++ b/PC/python33gen.py @@ -1,25 +1,24 @@ -# Generate python33stub.def out of python3.def
-# The regular import library cannot be used,
-# since it doesn't provide the right symbols for
-# data forwarding
-out = open("python33stub.def", "w")
-out.write('LIBRARY "python33"\n')
-out.write('EXPORTS\n')
-
-inp = open("python3.def")
-inp.readline()
-line = inp.readline()
-assert line.strip()=='EXPORTS'
-
-for line in inp:
- # SYM1=python33.SYM2[ DATA]
- head, tail = line.split('.')
- if 'DATA' in tail:
- symbol, tail = tail.split(' ')
- else:
- symbol = tail.strip()
- out.write(symbol+'\n')
-
-inp.close()
-out.close()
-
+# Generate python33stub.def out of python3.def +# The regular import library cannot be used, +# since it doesn't provide the right symbols for +# data forwarding +out = open("python33stub.def", "w") +out.write('LIBRARY "python33"\n') +out.write('EXPORTS\n') + +inp = open("python3.def") +inp.readline() +line = inp.readline() +assert line.strip()=='EXPORTS' + +for line in inp: + # SYM1=python33.SYM2[ DATA] + head, tail = line.split('.') + if 'DATA' in tail: + symbol, tail = tail.split(' ') + else: + symbol = tail.strip() + out.write(symbol+'\n') + +inp.close() +out.close() |