本文整理汇总了Python中application.Application.run方法的典型用法代码示例。如果您正苦于以下问题:Python Application.run方法的具体用法?Python Application.run怎么用?Python Application.run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类application.Application
的用法示例。
在下文中一共展示了Application.run方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import run [as 别名]
def main():
parser = ArgumentParser(description=
'MegaMinerAI PyVis - Python Implementation of the Visualizer')
parser.add_argument('glog', type=str, nargs='*',
help='Optional glogs to open in the visualizer.')
parser.add_argument('-f', dest='fullscreen', action='store_true',
help='Start in fullscreen mode')
parser.add_argument('-a', dest='arena', metavar='server', type=str, nargs=1,
help='Enables arena mode querying from the given url')
parser.add_argument('-s', dest='spectate',
metavar=('server', 'gamenumber'), nargs=2, type=str,
help='Spectates on gamenumber at server.')
args = parser.parse_args()
app = Application(fullscreen=args.fullscreen)
'''
renderer = Renderer()
renderer.register_with_app(app)
app.request_update_on_draw(Test(renderer).update)
r = Renderer.Rectangle(1, 2, 20, 30, renderer=renderer)
try:
r = Renderer.Rectangle(40, 40, 20, 30)
except:
pass
'''
app.run(args.glog)
示例2: main
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import run [as 别名]
def main(stdscr):
configs = Configs(host="localhost", port=1488, nport=1489)
# We must delay all our packages initialization to give native
# curses chance inialize inteslf properly.
from application import Application
app = Application(stdscr, configs)
app.run()
示例3: main
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import run [as 别名]
def main():
app = Application()
renderer = Renderer()
renderer.register_with_app(app)
#app.request_update_on_draw(Test(renderer).update)
mainWindow = ui.Window(renderer, 50, 50, 300, 400)
mainWindow.addWidget(ui.Button, x=20, y=20, width=50, height=60, color=(1, 0, 1, 1), text="Example Text")
app.run()