예제 #1
0
def runLauncher(mytools):
    root = MainWindow('PyGadgets PP4E')
    for (name, commandLine) in mytools:
        b = Button(root,
                   text=name,
                   fg='black',
                   bg='beige',
                   border=2,
                   command=PortableLauncher(name, commandLine))
        b.pack(side=LEFT, expand=YES, fill=BOTH)

    root.mainloop()
예제 #2
0
파일: main.py 프로젝트: oktopus97/Stepper
def main():
    test = False

    management = Management()
    exp_q = management.Queue()
    inf_q = management.Queue()

    controller = Ctrl(exp_q, inf_q, test=test)

    app = wx.App()

    frame = MainWindow(None, controller, management)
    frame.Show()
    app.MainLoop()
예제 #3
0
    def do_activate(self):
        if not self.window:
            main_window = MainWindow(application=self, title='Rudolph')
            self.window = main_window.window
            self.window.set_application(self)

        self.window.present()
예제 #4
0
import sys
from PyQt5.QtWidgets import QApplication
from windows import MainWindow
import argparse
import sys
import os
import warnings
warnings.simplefilter('ignore')


def create_arg_parser():
    parser = argparse.ArgumentParser(description='####')
    parser.add_argument('inputFile',
                        help='Path to the input file with time series')
    return parser


if __name__ == '__main__':
    try:
        arg_parser = create_arg_parser()
        parsed_args = arg_parser.parse_args(sys.argv[1:])
        if os.path.exists(parsed_args.inputFile):
            filename = parsed_args.inputFile
        else:
            print("Файл несуществует")
        app = QApplication(sys.argv)
        window = MainWindow(filename)
        window.show()
        sys.exit(app.exec_())
    except:
        print("Правильный ввод: <py main.py dataset.csv>")
예제 #5
0
파일: main.py 프로젝트: sahirabibi/fitbit
from tkinter import *
from windows import MainWindow, Timer

window = Tk()
MainWindow(window)
window.mainloop()
예제 #6
0
def skipHour():
    allAway()
    skip(0, 1)


def skipAll():
    global skipAllFlag, tickStep, waitLabel
    allAway()
    skipAllFlag = True
    tickStep = 0
    waitLabel = mw.canvas.create_text(450, 300, text='Please, wait...', font='Arial 30 bold')


if __name__ == '__main__':    
    bm = BankModel()
    mw = MainWindow(bm)
    stat = {    
        'Clients': {
            'served': [0, 'count of served clients'],
            'missed': [0, 'count of missed clients'],
         },
        'Queue length': {
            'maximum': [0, 'maximum length of queue'],
            'average': [0, 'average length of queue'],
            'minimum': [0, 'minimum length of queue'],
         },
         'Others': {
            'average time in queue': [0, 'average time which client spends in queue'],
            'clerk workload': [0, 'average workload of clerks'],
            'bank profit': [0, 'bank accumulated profit']        
         }
예제 #7
0
from windows import MainWindow
from operation_component import *
from PyQt5.QtWidgets import QApplication, QWidget
import sys

app = QApplication(sys.argv)
point = Point(300, 300)
mw = MainWindow(200, 200, point, "main window")
# 使程序不会立即退出
sys.exit(app.exec_())
예제 #8
0
 def __init__(self):
     MainWindow.__init__(self, 'mixin', 'Main')
     content.__init__(self)
예제 #9
0
    config = Config.getInstance()
    #print(config)
    locale.setlocale(locale.LC_ALL, config['locale'])

    # Saving the curren PID
    file = open(pid_file, 'w')
    file.write("{}".format(os.getpid()))
    file.close()

    # Prepare for good closing
    signal.signal(signal.SIGTERM, receive_signal)

    #Fontawesome
    pyglet.font.add_file(
        os.path.join(os.path.dirname(__file__),
                     'otfs/Font Awesome 5 Free-Solid-900.otf'))
    #OWF
    pyglet.font.add_file(
        os.path.join(os.path.dirname(__file__), 'otfs/owfont-regular.otf'))

    w = MainWindow()
    w.title("RPI Display")
    w.configure(background='black')

    gl = ClockLayout(w)
    gl.place(relx=0.5, rely=0.5, anchor=CENTER)

    # GUI Main window
    w.mainloop()
예제 #10
0
파일: pycasso.py 프로젝트: Farm-Art/PyCasso
from windows import MainWindow
from PyQt5.QtWidgets import QApplication
import sys

if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = MainWindow()
    window.showFullScreen()
    sys.exit(app.exec())
예제 #11
0
import sys
import io

# fix pyinstaller --windowed issue case by you_get.
# you_get will modify sys.stdout.buffer, but when packaged, stdout bin
# setup to NullWriter at `pyiboot01_bootstrap.py`
# issue just like:
# https://github.com/pyinstaller/pyinstaller/issues/3503
# https://github.com/pyinstaller/pyinstaller/issues/1883
if "NullWriter" in str(type(sys.stdout)):
    sys.stdout.buffer = io.BytesIO()

import os
from PySide2.QtWidgets import QApplication
from windows import MainWindow
from utils.logger import get_logger

logger = get_logger()

if __name__ == '__main__':
    logger.info(f'process start at: {os.getpid()}')
    app = QApplication(sys.argv)
    main_window = MainWindow()
    main_window.show()
    sys.exit(app.exec_())
예제 #12
0
import wx
from windows import MainWindow

app = wx.App()
app.locale = wx.Locale(wx.LANGUAGE_CHINESE_SIMPLIFIED)
win = MainWindow()
win.Show()
app.MainLoop()

예제 #13
0
 def run(self):
     main_window = MainWindow()
     self.logger.debug("App started")
     main_window.mainloop()
예제 #14
0
def main():
    app = QtGui.QApplication(sys.argv)
    QtGui.QApplication.setStyle(QtGui.QStyleFactory.create('Cleanlooks'))
    image_repository = ImageRepository()
    ex = MainWindow(image_repository)
    sys.exit(app.exec_())
예제 #15
0
 def __init__(self):                                                    #初始化,使得并没有报错
     MainWindow.__init__(self, 'mixin', 'Main')
     content.__init__(self)
예제 #16
0
파일: main.py 프로젝트: Treczek/YouTata
    def __init__(self):
        self.log = logging.getLogger("")
        self.log.setLevel(logging.INFO)

        MainWindow()
예제 #17
0
 def __init__(self):
     MainWindow.__init__(self, 'mixin', 'Main')
     content.__init__(self)
예제 #18
0
 def __init__(self, config=ClockConfig, name=''):
     MainWindow.__init__(self, appname, name)
     clock = Clock(config, self)
     clock.pack(expand=YES, fill=BOTH)