FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/PC/python33gen.py at fe8440aec00af5bc2e995aaad205efa2e693a364 · python/cpython · GitHub
python
cpython
Repository navigation
Code
Issues
5k+
(5k+)
Pull requests
2.3k
(2.3k)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
PC
/
python33gen.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (21 loc) · 584 Bytes
Breadcrumbs
cpython
/
PC
/
python33gen.py
Copy path
File metadata and controls
24 lines (21 loc) · 584 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
()
Back
|
FazBrowse Home
|
New Git URL