1 # bgenall - Generate all bgen-generated modules
7 def bgenone(dirname
, shortname
):
10 # Sigh, we don't want to lose CVS history, so two
11 # modules have funny names:
12 if shortname
== 'carbonevt':
13 modulename
= 'CarbonEvtscan'
14 elif shortname
== 'ibcarbon':
15 modulename
= 'IBCarbonscan'
17 modulename
= shortname
+ 'scan'
19 m
= __import__(modulename
)
21 print "Error:", shortname
, sys
.exc_info()[1]
26 print "Error:", shortname
, sys
.exc_info()[1]
33 sys
.path
.insert(0, os
.curdir
)
37 srcdir
= os
.path
.join(os
.path
.join(sys
.prefix
, 'Mac'), 'Modules')
38 srcdir
= os
.path
.abspath(srcdir
)
39 contents
= os
.listdir(srcdir
)
41 moduledir
= os
.path
.join(srcdir
, name
)
42 scanmodule
= os
.path
.join(moduledir
, name
+'scan.py')
43 if os
.path
.exists(scanmodule
):
44 if bgenone(moduledir
, name
):
48 print 'Done:', string
.join(success
, ' ')
50 print 'Failed:', string
.join(failure
, ' ')
54 if __name__
== '__main__':