Spaces:
Runtime error
Runtime error
File size: 990 Bytes
75660bd |
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 |
import importlib
#--- return a list of streamlit packages/pages to render
def packages():
#---
ary_pkg = []
ary_pkg.extend(['lit_continentData',
'lit_countryData'
])
'''
ary_pkg.extend(['lit_claimAnalysis',
'lit_claimAnomalies'
])
'''
return ary_pkg
def get_aryPkgDescr():
#--- load list of pages to display
aryDescr = []
aryPkgs = []
aryModules = packages()
for modname in aryModules:
m = importlib.import_module('.'+ modname,'uix')
aryPkgs.append(m)
#--- use the module description attribute if it exists
#--- otherwise use the module name
try:
aryDescr.append(m.description)
except:
aryDescr.append(modname)
return [aryDescr, aryPkgs] |