Ejemplo n.º 1
0
        if v: conf.Write('Prefs/Defaults/Container', DictToString(v))
        v = conf.defaultsControl
        if v: conf.Write('Prefs/Defaults/Control', DictToString(v))

        conf.Flush()


def main():
    if 'wxMac' in wx.PlatformInfo:
        # if running from an App bundle on Mac then there could be an
        # unexpected -psb_blahblah command-line arg.  Blow it away.
        for idx, arg in enumerate(sys.argv):
            if arg.startswith('-psn'):
                del sys.argv[idx]
                break

    app = App(0, useBestVisual=False)
    #app.SetAssertMode(wx.PYAPP_ASSERT_LOG)
    app.MainLoop()


if __name__ == '__main__':
    # Substitute wx.tools.XRCed with local module
    try:
        from XRCed.xrced import main
    except ImportError:
        print >> sys.stderr, 'XRCed parent directory must be in PYTHONPATH for local running'
        raise
    sys.modules['wx.tools.XRCed'] = sys.modules['XRCed']
    main()
Ejemplo n.º 2
0
#        conf.Write('Prefs/allowExec', conf.allowExec)
        v = conf.defaultsContainer
        if v: conf.Write('Prefs/Defaults/Container', DictToString(v))
        v = conf.defaultsControl
        if v: conf.Write('Prefs/Defaults/Conteol', DictToString(v))
        
        conf.Flush()

def main():
    if 'wxMac' in wx.PlatformInfo:
        # if running from an App bundle on Mac then there could be an
        # unexpected -psb_blahblah command-line arg.  Blow it away.
        for idx,arg in enumerate(sys.argv):
            if arg.startswith('-psn'):
                del sys.argv[idx]
                break
            
    app = App(0, useBestVisual=False)
    #app.SetAssertMode(wx.PYAPP_ASSERT_LOG)
    app.MainLoop()

if __name__ == '__main__':
    # Substitute wx.tools.XRCed with local module
    try:
        from XRCed.xrced import main
    except ImportError:
        print >>sys.stderr, 'XRCed parent directory must be in PYTHONPATH for local running'
        raise
    sys.modules['wx.tools.XRCed'] = sys.modules['XRCed']
    main()