def main(): # parse arguments: logger.info("Parsing command line arguments") parser.prog = "hiob_gui" args = parser.parse_args() # create Configurator logger.info("Creating configurator object") ros_config = None if args.ros_publish is not None or args.ros_subscribe is not None: ros_config = { 'subscribe': args.ros_subscribe, 'publish': args.ros_publish } conf = Configurator(hiob_path=hiob_path, environment_path=args.environment, tracker_path=args.tracker, ros_config=ros_config) # enable or disable se, depending on arg given conf.tracker["scale_estimator"]["use_scale_estimation"] = args.use_se # execute app app and run tracking logger.info("Initiate tracking process in app app") app = App(logger, conf) app.run()
def main(): app = App() app.run()
def main(): app = App(guide) app.run()
import os if __name__ == '__main__': os.environ['__PACKAGE_NAME__'] = 'SyncView' os.environ[ '__SECRET_KEY__'] = 'Dr4N5fXz6P88LcYvcfnCtlCK3-qoaisD6gQmz-kQj2c=' os.environ['release_version'] = '1.0.2' from core.app import App app = App('SyncView') app.run() app.MainLoop()
#!/usr/bin/env python from core.app import App app = App() app.load("test.sim") app.run()
import sys from config import configuration from core.app import App from PyQt5 import QtWidgets if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) explorer = App(configuration) explorer.show() explorer.run() sys.exit(app.exec_())
from models.user_group import UserGroup from models.vpb_card import VPBBank reload(sys) mail = Mail() app = App(__name__, template_folder='./webapp/templates', static_folder='./webapp/static') app.config.from_object(settings) db = MongoEngine(app) mail.init_app(app) toolbar = DebugToolbarExtension(app) admin = Admin(app, template_mode='bootstrap3') admin.add_view(ModelView(User, endpoint='Manage User')) admin.add_view(ModelView(Product, endpoint='Manage Product')) admin.add_view(ModelView(UserGroup, endpoint='User Group')) admin.add_view(ModelView(VCBBank, endpoint='VCB Cards')) admin.add_view(ModelView(VPBBank, endpoint='VPB Cards')) admin.add_view(ModelView(CertificateKey, endpoint='Certificate Key')) app.auto_register_blueprint() app.before_request(create_or_update_session) app.after_request(set_session_cookie) app.auto_add_template_filters() if __name__ == '__main__': app.run(host="0.0.0.0", port=Ports.MERCHANT, ssl_context=('cert.pem', 'key.pem'))
def main(): win = Tk() app = App(win) app.run()
from common.constants import Ports from core.app import App from importlib import reload from models.vcb_card import VCBBank from vietcombank_app import settings reload(sys) mail = Mail() app = App(__name__, template_folder='./vpbank_app/templates', static_folder='./webapp/static') app.config.from_object(settings) db = MongoEngine(app) app.auto_add_template_filters() admin = Admin(app, template_mode='bootstrap3') admin.add_view(ModelView(VCBBank, endpoint='Manage VCBBank')) mail.init_app(app) from vpbank_app.views import home, api app.register_blueprint(home.module) app.register_blueprint(api.module) if __name__ == '__main__': app.run(host="0.0.0.0", port=Ports.VPB_BANK)