Python Forum
[WxPython] Using thread in the wxPython
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[WxPython] Using thread in the wxPython
#7
Really in self.run() there are some GUI control read and update the GUI controls. So, I summarize all the code to it function and call as:

    def button_run(self, event):
        ''' @brief Call to run KiCost.'''
        event.Skip()
        self.run()
        #wx.CallLater(10, self.run) # Necessary to not '(core dumped)' with wxPython.

    @anythread
    def run(self):
        ''' @brief Run KiCost.'''
Also updated the wxAnyThread file (both available in https://github.com/hildogjr/KiCost/blob/...ost_gui.py).
The GUI and the process works, but during the process o the CLI (the GUI is used to run a command line based software), the GUI still freezing. About remove the main code/functionality out of the anythread: I changed the sys.out to output the log of the CLI program in a textControl so, even the CLI program start to interact with the GUI.
Reply


Messages In This Thread
Using thread in the wxPython - by hildogjr - Aug-07-2018, 03:47 PM
RE: Using thread in the wxPython - by Gribouillis - Aug-07-2018, 07:47 PM
RE: Using thread in the wxPython - by hildogjr - Aug-08-2018, 05:31 PM
RE: Using thread in the wxPython - by Gribouillis - Aug-08-2018, 07:44 PM
RE: Using thread in the wxPython - by hildogjr - Aug-08-2018, 08:12 PM
RE: Using thread in the wxPython - by Gribouillis - Aug-08-2018, 08:47 PM
RE: Using thread in the wxPython - by hildogjr - Aug-09-2018, 07:52 PM
RE: Using thread in the wxPython - by Gribouillis - Aug-09-2018, 08:51 PM
RE: Using thread in the wxPython - by hildogjr - Aug-11-2018, 02:59 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020