FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Mac/scripts/bgenall.py at 2.7 · python-emscripten/cpython · GitHub
python-emscripten
cpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Mac
/
scripts
/
bgenall.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
56 lines (53 loc) · 1.46 KB
Breadcrumbs
cpython
/
Mac
/
scripts
/
bgenall.py
Copy path
File metadata and controls
56 lines (53 loc) · 1.46 KB
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# bgenall - Generate all bgen-generated modules
#
import
sys
import
os
import
string
def
bgenone
(
dirname
,
shortname
):
os
.
chdir
(
dirname
)
print
'%s:'
%
shortname
# Sigh, we don't want to lose CVS history, so two
# modules have funny names:
if
shortname
==
'carbonevt'
:
modulename
=
'CarbonEvtscan'
elif
shortname
==
'ibcarbon'
:
modulename
=
'IBCarbonscan'
else
:
modulename
=
shortname
+
'scan'
try
:
m
=
__import__
(
modulename
)
except
:
print
"Error:"
,
shortname
,
sys
.
exc_info
()[
1
]
return
0
try
:
m
.
main
()
except
:
print
"Error:"
,
shortname
,
sys
.
exc_info
()[
1
]
return
0
return
1
def
main
():
success
=
[]
failure
=
[]
sys
.
path
.
insert
(
0
,
os
.
curdir
)
if
len
(
sys
.
argv
)
>
1
:
srcdir
=
sys
.
argv
[
1
]
else
:
srcdir
=
os
.
path
.
join
(
os
.
path
.
join
(
sys
.
prefix
,
'Mac'
),
'Modules'
)
srcdir
=
os
.
path
.
abspath
(
srcdir
)
contents
=
os
.
listdir
(
srcdir
)
for
name
in
contents
:
moduledir
=
os
.
path
.
join
(
srcdir
,
name
)
scanmodule
=
os
.
path
.
join
(
moduledir
,
name
+
'scan.py'
)
if
os
.
path
.
exists
(
scanmodule
):
if
bgenone
(
moduledir
,
name
):
success
.
append
(
name
)
else
:
failure
.
append
(
name
)
print
'Done:'
,
string
.
join
(
success
,
' '
)
if
failure
:
print
'Failed:'
,
string
.
join
(
failure
,
' '
)
return
0
return
1
if
__name__
==
'__main__'
:
rv
=
main
()
sys
.
exit
(
not
rv
)
Back
|
FazBrowse Home
|
New Git URL