Like this question, wxPython + PyObjC causes the application to crash at the end , but there the code has more redundant code.
I have the following two code examples, the last one will work, and the first one works fine.
The only difference in the code is the import order.
This code is working fine.
import time
import objc
import wx
app = wx.App(redirect=False)
time.sleep(3)
This code launches segfaults when the program crashes.
import time
import wx
import objc
app = wx.App(redirect=False)
time.sleep(3)
How to replicate
- Make sure pyobjc is installed and you can import objc
- Make sure wxPython is installed (it seems that both 2.9 and 3.0 are running).
- execute python command
source
share