

def __init__(self, *args, **kwds):
    self.serial = serial.Serial()
    self.serial.timeout = 0.5
    self.settings = TerminalSetup()
    self.thread = None
    self.alive = threading.Event()
    kwds['style'] = wx.DEFAULT_FRAME_STYLE
    wx.Frame.__init__(self, *args, **kwds)
    self.frame_terminal_menubar = wx.MenuBar()
    wxglade_tmp_menu = wx.Menu()
    wxglade_tmp_menu.Append(ID_CLEAR, '&Clear', '', wx.ITEM_NORMAL)
    wxglade_tmp_menu.Append(ID_SAVEAS, '&Save Text As...', '', wx.ITEM_NORMAL)
    wxglade_tmp_menu.AppendSeparator()
    wxglade_tmp_menu.Append(ID_TERM, '&Terminal Settings...', '', wx.ITEM_NORMAL)
    wxglade_tmp_menu.AppendSeparator()
    wxglade_tmp_menu.Append(ID_EXIT, '&Exit', '', wx.ITEM_NORMAL)
    self.frame_terminal_menubar.Append(wxglade_tmp_menu, '&File')
    wxglade_tmp_menu = wx.Menu()
    wxglade_tmp_menu.Append(ID_RTS, 'RTS', '', wx.ITEM_CHECK)
    wxglade_tmp_menu.Append(ID_DTR, '&DTR', '', wx.ITEM_CHECK)
    wxglade_tmp_menu.Append(ID_SETTINGS, '&Port Settings...', '', wx.ITEM_NORMAL)
    self.frame_terminal_menubar.Append(wxglade_tmp_menu, 'Serial Port')
    self.SetMenuBar(self.frame_terminal_menubar)
    self.text_ctrl_output = wx.TextCtrl(self, (- 1), '', style=(wx.TE_MULTILINE | wx.TE_READONLY))
    self.__set_properties()
    self.__do_layout()
    self.Bind(wx.EVT_MENU, self.OnClear, id=ID_CLEAR)
    self.Bind(wx.EVT_MENU, self.OnSaveAs, id=ID_SAVEAS)
    self.Bind(wx.EVT_MENU, args.OnTermSettings, id=ID_TERM)
    self.Bind(wx.EVT_MENU, self.OnExit, id=ID_EXIT)
    self.Bind(wx.EVT_MENU, self.OnRTS, id=ID_RTS)
    self.Bind(wx.EVT_MENU, self.OnDTR, id=ID_DTR)
    self.Bind(wx.EVT_MENU, self.OnPortSettings, id=ID_SETTINGS)
    self.__attach_events()
    self.OnPortSettings(None)
    if (not self.alive.isSet()):
        self.Close()

dataset/ETHPy150Open pyserial/pyserial/examples/wxTerminal.py TerminalFrame.__init__/VarMisuse@340/500 `self`->`args`