I'm completely new to coding and am trying to get my feet wet at the moment. I've installed Komodo Edit on my Mac and it works fine with Python 2.7 and 3.3.
I now want to use wxPython (with Python 2.7), which I installed. Through a YouTube tutorial I got the following
import wx
app=wx.App()
win=wx.Frame(None)
win.Show()
app.MainLoop
to simply see if it's working correctly. It should just open a small window with nothing in it.
When running that with Komodo the window shows up for a split-second and then disappears. When running the same thing in the Terminal the window appears but it crashes (beachball). The same error happens without the app.MainLoop at the end as well in Komodo.
As said before, I'm completely new to this and can't find the error on the internet. Is this a known error? I would love to get it to work with Komodo since my experience with it was quite pleasant for my needs.
Thank you very much! Oliver
Look at your example source and try again.
Spoiler Alert
app.MainLoop() # !, with parentheses
EDIT: It still crashes, post the output of the following (on a bash or whatsoever on your linux)
yourshell> python
Which version of Python does it print? On the python prompt:
...
>>> import wx
>>> print wx.__version__
Do you get the version of python you expect? We assume that your example lives in a file test.py in the directory you were in when starting python.
>>> import test
The empty window should show up now.