Please update your .axisrc and gladevcp docwith following one.
I've added killing of child processes at exit.
                                Pavel
#!/usr/bin/env python
# vim: sts=4 sw=4 et

import atexit

_dynamic_childs = {}
def _dynamic_tab(name, text):
    root_window.tk.eval('set _tabs_%(w)s  [${pane_top}.right insert end %(w)s  
-text [_ "%(t)s"]]' % {'w':name, 't':text})
    root_window.tk.eval('$_tabs_%s  configure -borderwidth 1' % name)
    return root_window.tk.call('set', '_tabs_%s' % name)

def _dynamic_tabs(inifile):
    from subprocess import Popen
    tab_names = inifile.findall("DISPLAY", "EMBED_TAB_NAME")
    tab_cmd   = inifile.findall("DISPLAY", "EMBED_TAB_COMMAND")
    print "Tabs: %s" % tab_names
    if len(tab_names) != len(tab_cmd):
        print "Invalid tab configuration"
        # Complain somehow
        return
    colors = ['blue', 'red', 'green']
    for i,t,c in zip(range(len(tab_cmd)), tab_names, tab_cmd):
        w = _dynamic_tab(str(i), t)
        xid = root_window.tk.call('winfo', 'id', w)
        #wl = nf.Widgets(root_window, ('frame', Frame, w))
        print w, xid
        if not xid: continue
        print "Xid: %s" % xid
        cmd = c.replace('{XID}', str(xid))
        print cmd
        child = Popen(cmd.split())
        _dynamic_childs[str(w)] = child #, wl.frame)

@atexit.register
def kill_dynamic_childs():
    for c in _dynamic_childs.values():
        c.terminate()


_dynamic_tabs(inifile)
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to