コード例 #1
0
 def setUp(self):
     self.app = htmlPy.AppGUI(width=512,
                              height=256,
                              x_pos=32,
                              y_pos=16,
                              title=u"Test Title",
                              allow_overwrite=True)
     self.AppClass = htmlPy.AppGUI
コード例 #2
0
 def setUp(self):
     self.app = htmlPy.AppGUI(allow_overwrite=True)
     self.app.static_path = os.path.join(
         os.path.dirname(os.path.abspath(__file__)), "template_and_static/")
     self.app.template_path = self.app.static_path
     self.frame = self.app.web_app.page().mainFrame()
     self.app.bind(BindingTest(self.app))
     self.app.web_app.loadFinished.connect(self.app.stop)
     self.reloader()
コード例 #3
0
def main(config):
    """
    Start up the editor to edit the configuration file.

    :param config: the configuration file wrapper object
    :type config: cea.config.Configuration
    :return:
    """
    app = htmlPy.AppGUI(title=u"CEA Configuration File Editor", maximized=False, developer_mode=True)

    app.template_path = os.path.join(BASE_DIR, 'templates')
    app.static_path = os.path.join(BASE_DIR, 'static')

    app.template = ("config_editor.html", {"config": config})
    app.bind(Backend(config), variable_name='backend')
    app.start()
コード例 #4
0
    def __init__(self):
        # Initial confiurations
        self.BASE_DIR = os.path.abspath(os.path.dirname(__file__))

        # GUI initializations
        self.htmlPy_app = htmlPy.AppGUI(title=u"Application",
                                        width=1200,
                                        height=750,
                                        plugins=True)

        # GUI configurations
        self.htmlPy_app.static_path = os.path.join(self.BASE_DIR, "static/")
        self.htmlPy_app.template_path = os.path.join(self.BASE_DIR,
                                                     "templates/")

        self.htmlPy_app.web_app.setMinimumWidth(1200)
        self.htmlPy_app.web_app.setMinimumHeight(750)
コード例 #5
0
# encoding=utf-8

import htmlPy
import os
import itchat
import time
from itchat.content import *
from threading import Thread
from pypinyin import lazy_pinyin
from PySide import QtCore

DEBUG = False
LOG_FILE = 'log.txt'

# Initial confiurations
app = htmlPy.AppGUI(title=u'微信群发机器人', maximized=False, plugins=True)

BASE_DIR = os.path.abspath(os.path.dirname('.'))
app.static_path = os.path.join(BASE_DIR, 'bootstrap\\')
app.template_path = os.path.join(BASE_DIR, 'templates\\')
app.web_app.setMinimumWidth(1050)
app.web_app.setMinimumHeight(723)
app.template = ('index.html', {})
log = open(LOG_FILE, 'wb+')


def write_log(string_args):
    try:
        content = time.strftime(u'%Y-%m-%d_%H:%M:%S',
                                time.localtime(
                                    time.time())) + u'\t' + string_args
コード例 #6
0
#this is the driver file that connects the backend code to the gui
import os
import htmlPy
import sys
from flask import flash
import PySide

# PySide.QtCore.Qt.FramelessWindowHint

#from PyQt4 import QtGui

# Initial confiurations
BASE_DIR = os.path.abspath(os.path.dirname(__file__))

# GUI initializations and settings
app = htmlPy.AppGUI(title=u"Application", developer_mode=True)
app.web_app.setMinimumWidth(480)
app.web_app.setMinimumHeight(650)
app.web_app.setMaximumHeight(800)
app.web_app.setMaximumHeight(480)

# app.web_app.update()
# app.maximized = True

# GUI configurations

# Folders location configuration
app.static_path = os.path.join(BASE_DIR, "static/")
app.template_path = os.path.join(BASE_DIR, "templates/")
importPath = os.path.join(BASE_DIR, "back_end_codes")
sys.path.append(importPath)
コード例 #7
0
ファイル: GUI.py プロジェクト: nyeinchanjob/GitFiles
import htmlPy
from back_end import BackEnd

app = htmlPy.AppGUI(
    title = u"Simple Application"
)
app.maximized = True
app.template_path = "."
app.bind(BackEnd())
app.template = ("index.html", {})

if __name__ = "__main__":
    app.start()
コード例 #8
0
import htmlPy
from back_end import BackEnd

app = htmlPy.AppGUI(
    title = u"Sample application", maximized=True)
app.maximized = True
app.template_path = "."
app.bind(BackEnd(app))

app.template = ("index.html", {})

if __name__ == "__main__":
    app.start()
コード例 #9
0
import os
import htmlPy

from api_1_0 import API

# Mode
RUN_MODE = 'development'

# Initial configurations
BASE_DIR = os.path.abspath(os.path.dirname(__file__))

# GUI initializations
app = htmlPy.AppGUI(title=u"Sample application",
                    maximized=True,
                    plugins=True,
                    developer_mode=True)

# GUI configurations
app.static_path = os.path.join(BASE_DIR, "static/")
app.template_path = os.path.join(BASE_DIR, "templates/")
app.bind(API(app, mode=RUN_MODE))

app.template = (u"index.html", {RUN_MODE: True})

if __name__ == "__main__":
    app.start()
コード例 #10
0
import htmlPy
import os
import json
import ipdb
import pandas as pd


class Backend(htmlPy.Object):
    @htmlPy.Slot(str, result=str)
    def show_table(self, file_path):
        df = pd.read_csv(file_path)

        return df.style.render()


if __name__ == '__main__':
    app = htmlPy.AppGUI(title=u"htmlPy Quickstart",
                        maximized=False,
                        developer_mode=True)

    app.template_path = os.path.abspath(".")
    app.static_path = os.path.abspath(".")

    app.template = ("index.html", {"username": "******"})
    app.bind(Backend())
    app.start()
コード例 #11
0
ファイル: main.py プロジェクト: Hemofektik/raspi_com
            cherrypy.response.headers[
                "Access-Control-Allow-Headers"] = "accept, content-type"
            return "OK"

        data = cherrypy.request.json
        if "text" in data and "duration" in data and "audible" in data:
            qtGuiHandler.set_text(data["text"], data["duration"],
                                  data["audible"])

        if "hide" in data:
            qtGuiHandler.hide()

        return {"status": "ok"}


app = htmlPy.AppGUI(title=u"raspi_msg", maximized=False)
app.developer_mode = True

if sys.platform.startswith('linux'):
    app.window.showFullScreen()

app.template_path = os.path.abspath(".")
app.static_path = os.path.abspath(".")

app.template = ("index.html", {"username": "******"})

app.bind(pyGUI())

# Instructions for running application
if __name__ == "__main__":
コード例 #12
0
 def setUp(self):
     self.app = htmlPy.AppGUI(maximized=True, allow_overwrite=True)
コード例 #13
0
ファイル: main.py プロジェクト: jo-me/AVV_EFA_Timetable
import htmlPy
from back_end import BackEnd
from PyQt4 import QtCore
import os

# Initial confiurations
BASE_DIR = os.path.abspath(os.path.dirname(__file__))

app = htmlPy.AppGUI(title=u"AVV Timetable")
app.maximized = True
app.template_path = "."
app.static_path = os.path.join(BASE_DIR, ".")
app.bind(BackEnd(app))
app.template = ("index.html", {})
#app.window.setWindowFlags(QtCore.Qt.FramelessWindowHint) # For Fullscreen

if __name__ == "__main__":
    app.start()
コード例 #14
0
ファイル: App_init.py プロジェクト: ankitpyc/Python-news-App
import htmlPy
import os
from PyQt4 import QtCore, QtGui
from NewsApp.NewsArticles import Articles
from config import init_configuration

myapp = htmlPy.AppGUI(title=u"NewsBytes")
articles = Articles(API_KEY="496f260a6944479db35a90652542e274")
myapp = init_configuration(myapp)
myapp.template = ("index.html", {"articles": articles.get()})
from Backend import NewsBack
# Register back-end functionalities

myapp.bind(NewsBack(myapp))
if __name__ == "__main__":
    # The driver file will have to be imported everywhere in back-end.
    # So, always keep app.start() in if __name__ == "__main__" conditional
    myapp.start()
コード例 #15
0
ファイル: monkey.py プロジェクト: learningperl/monkeymonitor
# coding:utf8

import htmlPy
import os
from mainp.options import op
from PySide import QtGui

app = htmlPy.AppGUI(title=u" ",
                    width=1200,
                    height=900,
                    x_pos=300,
                    y_pos=40,
                    plugins=True,
                    developer_mode=True,
                    allow_overwrite=True)

app.template_path = os.path.abspath(".")
app.static_path = os.path.abspath("./static/")
app.window.setWindowIcon(QtGui.QIcon("static/img/logo.png"))
be = op()
be.app = app

app.bind(be)
app.template = ("index.html", {})
app.start()
コード例 #16
0
ファイル: main.py プロジェクト: keremayoz/EnigmaPuzzleSolver
import htmlPy
from controller import Controller
import os
import PySide

BASE_DIR = os.path.abspath(os.path.dirname(__file__))

# GUI initializations
app = htmlPy.AppGUI(title=u"PuzzleSolver", maximized=True, plugins=True)


# GUI configurations
app.static_path = os.path.join(BASE_DIR, "static/")
app.template_path = os.path.join(BASE_DIR, "templates/")

app.window.setWindowIcon(PySide.QtGui.QIcon(BASE_DIR + "/static/img/icon.png"))

# Register back-end functionalities
app.bind(Controller(app, BASE_DIR))

app.template = ("index.html", {})

if __name__ == "__main__":
    app.start()
コード例 #17
0
import os
import htmlPy
from PyQt4 import QtGui

#initial configuration

#we get the absolute path of the initialization script to manage all the assets and backend
BASE_DIR = os.path.abspath(os.path.dirname(__file__))

#GUI initialization
app = htmlPy.AppGUI(title=u"PepperPresenter Application")
app.maximized = True
#GUI configuration
app.static_path = os.path.join(BASE_DIR, "static/")
app.template_path = os.path.join(BASE_DIR, "template/")

#app.window.setWindowIcon(QtGui.QIcon(BASE_DIR + "/static/img/icon.png"))

#Bind back end with front end
#import functionalities
from back_end.BackEnd import PepperApp
#register functionalities
app.bind(PepperApp(app))

app.template = ("index.html", {})
#run the app
if __name__ == "__main__":
    app.start()
コード例 #18
0
 def setUp(self):
     self.app = htmlPy.AppGUI(allow_overwrite=True)
     self.app.static_path = os.path.join(
         os.path.dirname(os.path.abspath(__file__)), "template_and_static/")
     self.app.template_path = self.app.static_path
     self.reloader()
コード例 #19
0
from controllers import RegisterClass as RC
from controllers import ListDataClass as LDC
from controllers import RegisterDataClass as RDC
from controllers import UpdateDataClass as UDC
from controllers import RemoveDataClass as REDC
from controllers import LoginClass as LGC
from controllers import CommonClass as CC
from controllers import ResetPasswordClass as RPC

# Initial config
BASE_DIR = os.path.abspath(os.path.dirname(__file__))

# GUI initializations
app = htmlPy.AppGUI(
    title=
    u"Password Manager - Created by Andre Poletto, Davi Kawasaki and Joao Vitor Bertoncini",
    maximized=True,
    plugins=True)

# GUI configurations
app.static_path = os.path.join(BASE_DIR, "static/")
app.template_path = os.path.join(BASE_DIR, "templates/")

app.web_app.setMinimumWidth(1024)
app.web_app.setMinimumHeight(768)
app.window.setWindowIcon(PySide.QtGui.QIcon(BASE_DIR + "/static/img/icon.png"))

app.template = ("index.html", {"list": []})

# Binding of back-end functionalities with GUI
app.bind(RC.Register(app))
コード例 #20
0
 def setUp(self):
     self.app = htmlPy.AppGUI(allow_overwrite=True)
     self.url = u"http://example.com/"
     self.app.web_app.loadFinished.connect(self.app.stop)
     self.app.url = self.url
     self.app.execute()
コード例 #21
0
import os
import htmlPy
from PyQt4 import QtGui

# Initial confiurations
BASE_DIR = os.path.abspath(os.path.dirname(__file__))

# GUI initializations
app = htmlPy.AppGUI(title=u"Application", maximized=True, plugins=True)

# GUI configurations
app.static_path = os.path.join(BASE_DIR, "static/")
app.template_path = os.path.join(BASE_DIR, "templates/")

app.web_app.setMinimumWidth(1024)
app.web_app.setMinimumHeight(768)
app.window.setWindowIcon(QtGui.QIcon(BASE_DIR + "/static/img/icon.png"))

# Binding of back-end functionalities with GUI

# Import back-end functionalities
from html_to_python import ClassName

# Register back-end functionalities
app.bind(ClassName())

# Instructions for running application
if __name__ == "__main__":
    # The driver file will have to be imported everywhere in back-end.
    # So, always keep app.start() in if __name__ == "__main__" conditional
    app.start()
コード例 #22
0
# coding=utf-8
import os
import htmlPy
from PySide import QtGui
from htmlpy_app.back_end import BackEnd

app = htmlPy.AppGUI(title=u"安卓测试工具", maximized=False, plugins=True)

BASE_DIR = os.path.abspath(os.path.dirname(__file__))  # 本文件所在位置的绝对路径
app.template_path = os.path.join(BASE_DIR, 'templates/')
app.static_path = os.path.join(BASE_DIR, 'static/')
app.window.setWindowIcon(QtGui.QIcon(BASE_DIR +
                                     "/static/img/icon.png"))  # 设置APP窗口图标
# app.web_app.setMinimumWidth(1024)
# app.web_app.setMinimumHeight(768)

app.bind(BackEnd(app))

app.template = ("template1.html", {})

if __name__ == "__main__":
    app.start()
コード例 #23
0
ファイル: gui.py プロジェクト: TheNewCivilian/DontSitTooLong
#!/usr/bin/python
import htmlPy
from back_end import BackEnd
from PyQt4 import QtCore
import os

if os.path.dirname(__file__) != '':
    os.chdir(os.path.dirname(__file__))
# Initial confiurations
BASE_DIR = os.path.abspath(os.path.dirname(__file__))

app = htmlPy.AppGUI(title=u"Dont sit too long!",width=700,height=820)
app.template_path = "."
app.static_path = os.path.join(BASE_DIR, ".")
app.bind(BackEnd(app))

if __name__ == "__main__":
    app.start()
コード例 #24
0
import htmlPy
from back_end import BackEnd

app = htmlPy.AppGUI(title=u"Sample application")

app.width = 310
app.height = 410
app.maximized = False
app.template_path = "."
app.bind(BackEnd(app))

app.template = ("index.html", {})

if __name__ == "__main__":
    app.start()
コード例 #25
0
import os
import htmlPy
from PyQt4 import QtGui


# Initial confiurations
BASE_DIR = os.path.abspath(os.path.dirname(__file__))


# GUI initializations
app = htmlPy.AppGUI(title=u"45C Robotics 2018 GUi", maximized=True, plugins=True)


# GUI configurations
app.static_path = os.path.join(BASE_DIR, "static/")
app.template_path = os.path.join(BASE_DIR, "templates/")

app.web_app.setMinimumWidth(1280)
app.web_app.setMinimumHeight(720)

app.maximized = True

app.template = ("index.html", {})
#app.window.setWindowIcon(QtGui.QIcon(BASE_DIR + "/static/img/icon.png"))

# Binding of back-end functionalities with GUI

# Import back-end functionalities
#from html_to_python import ClassName

# Register back-end functionalities
コード例 #26
0
import htmlPy
from back_end import BackEnd
import os
import webbrowser

app = htmlPy.AppGUI(title=u"Team 573 2018 Pit Scouting App")
app.maximized = True
#app.template_path = "C:\Users\savag\Desktop\ScoutingApp\Team573_2018ScoutingApps\MatchScoutingApp"
oscwd = os.getcwd()
app.template_path = oscwd
app.static_path = oscwd
app.bind(BackEnd(app))

app.template = ("index.html", {})

if __name__ == "__main__":
    url = "index.html"
    #chrome_path = 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe %s'
    #webbrowser.get(chrome_path).open(url)
    #webbrowser.open(url)
    app.start()
コード例 #27
0
ファイル: driver.py プロジェクト: isaacaddis/ROV2018
import os
import htmlPy
import serial
import time

from PyQt4 import QtGui

BASE_DIR = os.path.abspath(os.path.dirname(__file__))
app = htmlPy.AppGUI(title=u"45C Robotics 2018",
                    developer_mode=True,
                    maximized=True)

app.static_path = os.path.join(BASE_DIR, "static/")
app.template_path = os.path.join(BASE_DIR, "templates/")

app.web_app.setMinimumWidth(800)
app.web_app.setMinimumHeight(480)

app.maximized = True

app.template = ("op.html", {})

#app.window.setWindowIcon(QtGui.QIcon(BASE_DIR + "/static/img/icon.png"))

if __name__ == "__main__":
    app.start()
コード例 #28
0
import htmlPy
import os

app = htmlPy.AppGUI(title=u"htmlPy Quickstart", maximized=True)

app.template_path = os.path.abspath(".")
app.static_path = os.path.abspath(".")

app.template = ("index.html", {"username": "******"})

app.start()
コード例 #29
0
        button_frame = tkk.Frame(sidebar_frame)

        self.refresh_button = tkk.Button(button_frame, text='Refresh')
        self.refresh_button.pack(side=tk.BOTTOM, fill=tk.X)

        # pack main frames

        self.canvas.get_tk_widget().pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
        sidebar_frame.pack(side=tk.RIGHT, fill=tk.Y, expand=False)
        control_frame.grid_columnconfigure(0, pad=10)
        control_frame.grid_columnconfigure(1, pad=10)
        control_frame.pack(side=tk.TOP, expand=False)
        button_frame.pack(side=tk.BOTTOM, fill=tk.X)


if __name__ == "__main__":
    # root = tk.Tk()
    # root.geometry('800x600+300+300')

    # app = TapSimulatorView(root)

    # root.mainloop()

    app = htmlPy.AppGUI(title=u"Tapping Simulator 2000 SL")
    app.template_path = os.path.join(os.path.abspath("."), 'templates')
    app.static_path = os.path.join(os.path.abspath("."), 'static')

    app.template = ("index.html", {})
    app.start()