reloading any other module from a CodeRunner

2 views
Skip to first unread message

Charl Botha

unread,
Apr 4, 2012, 11:09:10 AM4/4/12
to devide...@googlegroups.com, Nora Baka, Francois Malan
Here's a trick to reload any other module, identified by its name,
from the CodeRunner:

#####
module_name = 'dvm0'
ge = obj._module_manager._devide_app._interface._graph_editor
glyphs = filter(lambda g: g._labelList[-1] == module_name, ge._get_all_glyphs())
if glyphs:
ge._reload_module(glyphs[0].module_instance, glyphs[0])
#####

you can also find modules by type:
module_type = 'ITKReader'
glyphs = filter(lambda g: g._labelList[0] == module_type, ge._get_all_glyphs())

Reply all
Reply to author
Forward
0 new messages