def OnInit(self):
wx.InitAllImageHandlers()
ser = serial.Serial()
print(ser)
# loop until cancel is pressed, old values are used as start for the next run
# show the different views, one after the other
# value are kept.
for flags in (SHOW_BAUDRATE, SHOW_FLOW, SHOW_FORMAT, SHOW_TIMEOUT, SHOW_ALL):
dialog_serial_cfg = SerialConfigDialog(None, -1, "", serial=ser, show=flags)
self.SetTopWindow(dialog_serial_cfg)
result = dialog_serial_cfg.ShowModal()
print(ser)
if result != wx.ID_OK:
break
# the user can play around with the values, CANCEL aborts the loop
while True:
dialog_serial_cfg = SerialConfigDialog(None, -1, "", serial=ser)
self.SetTopWindow(dialog_serial_cfg)
result = dialog_serial_cfg.ShowModal()
print(ser)
if result != wx.ID_OK:
break
return 0
# end of class MyApp
wxSerialConfigDialog.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录