Sunday, April 19, 2015

Using Python 3.4 and wxPython Phoenix

When I was creating the Boa Constructor video tutorials I was already using XRCed to create xrc files which is a different method of creating Python GUI's.

Then I found wxFormBuilder - OMG!

It took me 2 weeks to confidently use wxFormBuilder. I think wxFormBuilder is way better than Boa Constructor and XRCed.

Not only do you get to design the GUI, but you also get the wxPython design code generated for you.

It was at this point I thought, because I like wxFormBuilder so much, maybe I can take the plunge and move on to Python 3.4 and wxPython Phoenix.

I have loads of programs I wrote using Python 2.7 & wxPython so I thought I would install Python 3.4 on my notebook.

I have 2 computers
  • Vista PC (Python 2.7 & wxPython)
  • Windows 7 Notebook (Python 3.4 and wxPython Phoenix)

It's been a week now since using Python 3.4 and wxPython Phoenix, so here is my verdict:
  • At present I don't have dedicated custom programs written for a business,so I can move onto Python 3.4 and build new GUI's.
  • I build a lot of database applications and built an app that generates most of the code automatically for me. This saves me weeks if not months of coding by hand. I have had to build a new app to generate the code for database apps that will now use Python 3.4 and wxPython Phoenix. This is a good thing because it is forcing me to add new functions to the app that will speed up the development time. I have been avoiding this, thinking I will do this one of these days. Well that day has come. My pythonic coding has matured, so I am adding new methods of generating my code.
  • One of the things I need to get used to with Python 3.4 is that I keep getting errors because I'm using the old print "xyz" or print variable statements. I have to get used to using parentheses after the print statement print("xyz") or print(variable).
  • The wxPython design code generated by wxFormBuilder has issues because some of the wxPython Phoenix code and methods have changed.  There isn't a wxPython Phoenix Demo application to refer to the use of widgets, dialogs etc. so there is a lot of time spent looking for answers using the online docs. I have created a script that runs through the generated code and cleans it up so it will run using wxPython Phoenix and Python 3.4.
  • Boa Constructor was heavy on the generated code where as wxFormBuilders is a lot lighter on wxPython code and a lot cleaner.
  • I feel using wxFormBuilder is like building a house with bricks. The eventual GUI application you build using wxFormBuilder seems to be built a lot more solidly.
  • Oh yes what I really like about Python 3.4 is you don't get all those annoying .pyc files mixed in with all your .py files. They are stored in a separate __pycache__ directory.
Are you using Python 3.4 and wxPython Phoenix? Leave a comment what you think.


  1. When I last checked on Python 3.4 and wxPython Phoenix, it was so buggy and premature. That made me look elsewhere at PyQt/PySide Kivy.

    Its my prayer that wxPython soon be ready on Python 3.x, and mobile devices (Android & iOS)

    1. Yes I agree. I tried python 3.4 not too bad but there are still problems with third party modules catching up. I went back to python 2.7.9 and testing wxFormBuilder.

  2. I presume things have changed a lot by now. I'm using Python 3.6.1 with wxPython 4.0.0a3 (aka Phoenix), and have only seen minor issues that are easily addressed.

    I'm also using wxglade (from source repo) which is now very active again and has Python3 and Phoenix support :)

    I haven't tried wxFormBuilder. The screenshots looked impressive and I guess this is what a lot of people are used to coming from Embarcadero or Visual Studio, etc.

    I didn't progress to far with it because (a) I needed to build it run on my Mac, (b) it was in C++ and felt a Python based tool would be easier fix if need be. Boa looked dead and wxglade was the easiest to try.

    wxglade gets some getting used to, but I'm finally making progress with it and getting more proficient. It still has some design quirks and gaps, but doesn't everything.

  3. This comment has been removed by the author.

  4. This comment has been removed by the author.

  5. Nice blog this information is unique information i haven't seen ever by seeing this blog i came know lots of new things
    python training in Hyderabad the best career