示例#1
0
    def OnInit(self):
        try:
            from MainWindow import MainWindow

            win = MainWindow()
            win.Show()
        except:
            traceback.print_exc()
            return False

        return True
示例#2
0
 def OnInit(self):
     # # Parse command line arguments
     parser = argparse.ArgumentParser(
         description='Wuggy - A Multilingual Pseudoword Generator')
     parser.add_argument('--data',
                         help='specify a non-default data directory')
     parser.add_argument('--plugin',
                         help='specify a non-default plugin directory')
     try:
         clargs = parser.parse_args()
         config.cl_plugin_path = vars(clargs)['plugin']
         config.cl_data_path = vars(clargs)['data']
     except:
         "Exception parsing command line arguments"
     # Initialize the application
     wx.InitAllImageHandlers()
     mainwindow = MainWindow(None, -1, "")
     self.SetTopWindow(mainwindow)
     mainwindow.Show()
     return 1
示例#3
0
文件: main.py 项目: eschen42/mastr-ms
    def OnInit(self):
        #w = wx.LogChain(wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogGui() )

        win = MainWindow(self.config, None)
        self.win = win
        self.msds = MSDataSyncAPI(self.config, win.getLog())

        #let the jobs execute in threads
        #disable this for debugging
        self.msds.startThread()

        win.MSDSCheckFn = self.msds.checkRsync
        win.MSDSHandshakeFn = self.msds.handshakeRsync
        win.msds = self.msds
        win.resetTimeTillNextSync()
        #wx.Log_SetActiveTarget( wx.LogWindow(None, 'loggin...') )
        win.Show(True)
        self.SetTopWindow(win)
        return True
示例#4
0
 def OnInit(self):
     # # Parse command line arguments
     parser = argparse.ArgumentParser(description='Wuggy - A Multilingual Pseudoword Generator')
     parser.add_argument('--data', help='specify a non-default data directory')
     parser.add_argument('--plugin', help='specify a non-default plugin directory')
     try:
         clargs = parser.parse_args()
         config.cl_plugin_path=vars(clargs)['plugin']
         config.cl_data_path=vars(clargs)['data']
     except:
         "Exception parsing command line arguments"
     # Check for Updates
     BASEURL = "http://crr.ugent.be"
     self.InitUpdates(updatesURL=BASEURL+"/Wuggy/downloads/", 
                      changelogURL=BASEURL+"/Wuggy/changelog.txt")
     self.SetAppDisplayName('Wuggy')
     # Initialize the application
     # wx.InitAllImageHandlers()
     mainwindow = MainWindow(None, -1, "")
     self.SetTopWindow(mainwindow)
     mainwindow.Show()
     self.CheckForUpdate()
     return 1
示例#5
0
import wx, wx._adv, wx._html
from MainWindow import MainWindow

if __name__ == '__main__':
    app = wx.App()
    mainWindow = MainWindow()
    mainWindow.Show()
    app.MainLoop()
示例#6
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 on Tue Jul 12 13:27:06 2011

import wx
from MainWindow import MainWindow

if __name__ == "__main__":
    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    frame_Primary = MainWindow(None, -1, "")
    app.SetTopWindow(frame_Primary)
    frame_Primary.Show()
    #force the user to pick a serial port at the beginning
    frame_Primary.OnChangeSerialPort(None)
    app.MainLoop()
示例#7
0
'''
Created on May 15, 2010

@author: Dr. Rainer Hessmer
'''

from Model.MainModel import MainModel
import wx
import sys
from MainWindow import MainWindow
#import matplotlib
#matplotlib.use('WXAgg')


app = wx.App(False)

try:
    mainModel = MainModel(serialPort = 6)
    frame = MainWindow(None, mainModel)
    frame.Show()

    app.MainLoop()
    app.AppName = 'Balancing Robot'

    mainModel.Close()
except:
    print "Unexpected error:", sys.exc_info()[0]