File size: 849 Bytes
b831e6f |
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 |
import importlib
#--- return a list of streamlit packages/pages to render
def packages():
#---
ary_pkg = []
ary_pkg.extend(['lit_continentData',
'lit_countryData'
])
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] |