wxpython - python application structure, dynamically loading modules -
i'm new python , wxpython.
have question concerning application structure following:
there base module, main module.
main module gets called @ beginning.
in module happens bootstrapping , switching 1 component another.
main module shows main frame, in upper area there tool bar.
in toolbar there text field enter code component, example "todo" or "wiki".
area below tool bar empty @ beginning. place gui selected component should placed.
question now:
user types in code selected component, example "todo".
have dynamically load module component , place view of module in lower section of parent (main) module. how do this?
alot in advance
create dictionary of keywords module names, , load module searching key in dictionary.
for example:
from interface.modules import wiki, search, web, default modules = {'wiki': wiki, 'search': search, 'internet': web, 'browser': web} module_to_load = modules.get(user_input, default) view.load(module_to_load)
Comments
Post a Comment