コード例 #1
0
ファイル: gui_app.py プロジェクト: aschankler/bumps
    def after_show(self):
        from . import signal
        sys.excepthook = excepthook

        # Process options
        bumps_options.BumpsOpts.FLAGS |= set(('inspect','syspath'))
        opts = bumps_options.getopts()

        # For wx debugging, load the wxPython Widget Inspection Tool if requested.
        # It will cause a separate interactive debugger window to be displayed.
        if opts.inspect: inspect()

        if opts.syspath:
            print("*** Resource directory:  "+resource_dir())
            print("*** Python path is:")
            for i, p in enumerate(sys.path):
                print("%5d  %s" %(i, p))

        # Put up the initial model
        model, output = initial_model(opts)
        if not model: model = plugin.new_model()
        signal.log_message(message=output)
        self.frame.panel.set_model(model=model)
        self.frame.panel.fit_config = opts.fit_config

        self.frame.panel.Layout()
        self.frame.panel.aui.Split(0, wx.TOP)
        self.frame.Show()
コード例 #2
0
ファイル: gui_app.py プロジェクト: santosh653/bumps
    def after_show(self):
        from . import signal
        sys.excepthook = excepthook

        # Process options
        bumps_options.BumpsOpts.FLAGS |= set(('inspect', 'syspath'))
        opts = bumps_options.getopts()

        # For wx debugging, load the wxPython Widget Inspection Tool if requested.
        # It will cause a separate interactive debugger window to be displayed.
        if opts.inspect: inspect()

        if opts.syspath:
            print("*** Resource directory:  " + resource_dir())
            print("*** Python path is:")
            for i, p in enumerate(sys.path):
                print("%5d  %s" % (i, p))

        # Put up the initial model
        model, output = initial_model(opts)
        if not model:
            model = plugin.new_model()
        signal.log_message(message=output)
        self.frame.panel.set_model(model=model)
        self.frame.panel.set_fit_config(opts.fit_config)

        self.frame.panel.Layout()
        self.frame.panel.aui.Split(0, wx.TOP)
        self.frame.Show()
コード例 #3
0
ファイル: gui_app.py プロジェクト: carlkl/bumps
    def after_show(self):
        from . import signal
        sys.excepthook = excepthook

        # Process options
        bumps_options.BumpsOpts.FLAGS |= set(('inspect','syspath'))
        opts = bumps_options.getopts()

        # For wx debugging, load the wxPython Widget Inspection Tool if requested.
        # It will cause a separate interactive debugger window to be displayed.
        if opts.inspect: inspect()

        if opts.syspath:
            print("*** Resource directory:  "+resource_dir())
            print("*** Python path is:")
            for i, p in enumerate(sys.path):
                print("%5d  %s" %(i, p))

        # Put up the initial model
        model, output = initial_model(opts)
        if not model: model = plugin.new_model()
        signal.log_message(message=output)
        #self.frame.panel.show_view('log')
        self.frame.panel.set_model(model=model)
        self.frame.panel.fit_config = opts.fit_config

        # When setting initial aui panel split:
        #     mac layout fails if frame is already shown
        #     windows/unix layout fails if frame is not shown
        isMac = "cocoa" in wx.version()
        if not isMac: self.frame.Show()
        self.frame.panel.Layout()
        self.frame.panel.aui.Split(0, wx.TOP)
        if isMac: self.frame.Show()
        print "ready to go"