mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-12 22:25:52 +00:00
massive transfer of risk-reliability book
This commit is contained in:
parent
6697c0f5f8
commit
3d24a01439
152 changed files with 57886 additions and 0 deletions
23
book/code/test.py
Normal file
23
book/code/test.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import modulefinder
|
||||
|
||||
finder = modulefinder.ModuleFinder()
|
||||
finder.run_script('cosinewave.py')
|
||||
|
||||
moduleslist = {}
|
||||
for name, mod in finder.modules.iteritems():
|
||||
filename = mod.__file__
|
||||
if filename is None:
|
||||
continue
|
||||
if '__' in name:
|
||||
continue
|
||||
#if "python" in filename.lower():
|
||||
# continue
|
||||
moduleslist[name.split(".")[0]] = True
|
||||
#print '%s: %s' % (name, filename)
|
||||
#print ','.join(mod.globalnames.keys()[:3])
|
||||
|
||||
print('Loaded modules:')
|
||||
for name, dummy in moduleslist.iteritems():
|
||||
print(name)
|
||||
|
||||
input("Press Enter to continue...")
|
||||
Loading…
Add table
Add a link
Reference in a new issue