本文整理汇总了Python中pyjd.run函数的典型用法代码示例。如果您正苦于以下问题:Python run函数的具体用法?Python run怎么用?Python run使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了run函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: display_ui
def display_ui(ui, parent, style):
"""Display the UI."""
ui.owner.init(ui, parent, style)
ui.control = ui.owner.control
ui.control._parent = parent
try:
ui.prepare_ui()
except:
ui.control.setParent(None)
ui.control.ui = None
ui.control = None
ui.owner = None
ui.result = False
raise
ui.handler.position(ui.info)
# restore_window(ui)
RootPanel().add(ui.control)
pyjd.run()
if style == BaseDialog.NONMODAL:
ui.control.show()
else:
# ui.control.setWindowModality(QtCore.Qt.WindowModal)
ui.control.exec_()
RootPanel().add(ui.control)
pyjd.run()
示例2: main
def main(test_gen_out):
pyjd.setup("public/uitest.html")
t = RunTests(test_gen_out)
t.add(LabelTest)
t.add(EventTest)
t.add(DOMTest)
pyjd.run()
示例3: str
msg = name + ' ' + action + ' (' + str(x) + ', ' + str(y) + ')'
self.msgarea1.setText(msg)
log.debug(msg)
def onMouseMove(self, sender, x, y):
self._mouseActionMessage(sender.areaname, "move", x, y)
def onMouseDown(self, sender, x, y):
self._mouseActionMessage(sender.areaname, "down", x, y)
def onMouseUp(self, sender, x, y):
self._mouseActionMessage(sender.areaname, "up", x, y)
def onMouseEnter(self, sender):
self._mouseActionMessage(sender.areaname, "enter")
def onMouseLeave(self, sender):
self._mouseActionMessage(sender.areaname, "leave")
def onClick(self, sender):
msg = "you clicked on baby katie's " + sender.areaname
self.msgarea2.setText(msg)
log.debug(msg)
if __name__ == '__main__':
pyjd.setup("http://127.0.0.1/examples/maparea/public/MapAreaDemo.html")
app = MapAreaDemo()
app.onModuleLoad()
pyjd.run()
示例4: onModuleLoad
import pyjd # dummy in pyjs
from pyjamas.ui.RootPanel import RootPanel
from DayFilterWidget import DayFilterWidget
from SchoolCalendarWidget import SchoolCalendarWidget
class DynaTable:
def onModuleLoad(self):
slot = RootPanel("calendar")
if slot is not None:
calendar = SchoolCalendarWidget(15)
slot.add(calendar)
slot = RootPanel("days")
if slot is not None:
filterWidget = DayFilterWidget(calendar)
slot.add(filterWidget)
if __name__ == '__main__':
pyjd.setup("http://127.0.0.1/examples/dynamictable/public/DynaTable.html") # dummy in pyjs
app = DynaTable()
app.onModuleLoad()
pyjd.run() # dummy in pyjd
示例5: onModuleLoad
def onModuleLoad(self):
text = TextBox()
df1 = DateField()
df2 = DateField(format='%Y/%m/%d')
b = Button("Show Calendar", self)
self.cal = Calendar()
df3 = MonthField()
vp = VerticalPanel()
vp.setSpacing(10)
vp.add(df1)
vp.add(b)
vp.add(df2)
vp.add(df3)
RootPanel().add(vp)
def onClick(self, sender):
p = CalendarPopup(self.cal)
x = sender.getAbsoluteLeft() + 10
y = sender.getAbsoluteTop() + 10
p.setPopupPosition(x,y)
p.show()
if __name__ == '__main__':
pyjd.setup("./public/cssauto.html") # dummy in pyjs
app = App()
app.onModuleLoad()
pyjd.run() # dummy in pyjs