Python Forum

Full Version: wxPython phoenix install step by step
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The following was done on windows 7 using python 3.6, it assumes you are starting from scratch
Phoenix is the code name of for the new version of wxPython which runs in python 3.x
  • step 1: Setup part 1
    using snippsat's tutorial:  [Basic] [Part-2]Python environment Windows              
    if not installed --> install cnmder - make sure you complete the register step
    if not installed --> install pip

  • step 2: Change to project directory
    with windows explorer, navigate to the directory where you wish to create
    your pheonix directory - Do not create a directory to hold the demo yet

  • step 3: Start cmder
    right click in windows explorer and start cmder

  • step 4: from cmder Create a virtual environment named ProjectPhoenix
    λ python -m venv ProjectPhoenix
  • step 5: Activate ProjectPhoenix virtual environment
    λ cd ProjectPhoenix
    λ .\Scripts\activate.bat
  • step 6: Install Phoenix
     λ cd ProjectPheonix
    λ pip install wxpython
    If using wheel,eg 32-bit.
    pip install wxPython-4.0.0a2-cp36-cp36m-win32.whl

  • step 7: Get Phoenix source code - This is where the demo code is located
    λ cd ..
    if not installed-> git
    λ mkdir git
    λ cd git
    from browser:
    download should start automatically
    save in ProjectPheonix\git
     λ tar -zxf git-2.0.0.tar.gz
    λ cd git-2.0.0
    λ make configure
    λ ./configure --prefix=/usr
    λ make all doc info
    λ sudo make install install-doc install-html install-info
    clone ProjectPheonix:
    λ cd ProjectPheonix (or cd ..)
    λ git clone
  • step 8: Run demo
    λ cd ProjectPheonix\Phoenix\demo
    λ python

Demo Screenshots - The demo allows you to preview all widgets and look at the source code that created them

images by snippsat
[Image: demo3s.jpg]
[Image: demoty.jpg]

Some useful links consolidated from wxpython Pheonix pages

A GUI Builder for wxwidgets - wxGlade is a GUI designer written in Python with the popular GUI toolkit wxPython, that helps you create wxWidgets/wxPython user interfaces. At the moment it can generate Python, C++, Perl, Lisp and XRC (wxWidgets' XML resources) code.

As you can guess by the name, its model is Glade, the famous GTK+/GNOME GUI builder, with which wxGlade shares the philosophy and the look & feel (but not a line of code).

It is not (and will never be) a full featured IDE, but simply a "designer": the generated code does nothing apart from displaying the created widgets. If you are looking for a complete IDE, maybe Eric Python IDE, PyCharm, Code::Blocks or one of the many other IDE is the right tool.

wxPython GUI Builder -
  • Visual design of wxWidgets dialogs, frames, panels, toolbars and menubars
  • Source code generation for C++, Python, PHP, Lua and XRC
  • Support for AUI-managed frames

Home Page - We have had a lot of questions on the newsgroup asking how to go about learning wxPython. This page gives some pointers on how to do just that.

wheel - wxPython Pheonix download

Learn wxPython - We have had a lot of questions on the newsgroup asking how to go about learning wxPython. This page gives some pointers on how to do just that.

Getting started with wxPython - - Title says it all.

This page is vary handy
Classic vs Phoenix cross-reference - This document contains a list of the most common wxPython functions, classes and Window / Sizer methods which need to be changed to a new syntax in Phoenix; it presents the modification in a 2-columns, space-separated table containing the old wxPython (Classic) name on the left and the new (if it exists) Phoenix name on the right. I found it impressively useful while porting AGW to Phoenix.

wx.Window - wx.Window is the base class for all windows and represents any visible object on screen.

Most common classes - The classes in this module are the most commonly used classes for wxPython, which is why they have been made visible in the core wx namespace. Everything you need for building typical GUI applications is here.

Docstring Guidelines - his document gives a brief introduction about the current docstrings standards in the Phoenix project. Most of the documentation in the Phoenix core is automatically generated by parsing the wxWidgets XML docs; however, Phoenix has its own pure-Python functions and classes in at least two places:
  • Core Library: examples include wx.CallLater and wx.date2pydate, which require manual input of the documentation strings. This is achieved by editing the source Python files located in the etg folder in the Phoenix directory tree
  • wx.lib: the whole of wx.lib (and its sub-folders) is made up of pure-Python modules, often representing owner-drawn widgets which are not available as wrapped modules. Again, this requires manual editing of the source Python files.

wx.CallLater - A convenience class for wx.Timer, that calls the given callable object once after the given amount of milliseconds, passing any positional or keyword args. The return value of the callable is available after it has been run with the GetResult method.

wxPython Project Phoenix Migration Guide - This document will describe some of the incompatibilities that programmers will run into when migrating code from Classic wxPython to the Phoenix

Everything - Full documentation

This visual index is outstanding
Thumbnail Gallery index - Click on image and see documentation

Python Module Index - Index to documentation by module name

Index pages by letter - If you know the name of the widget you want document for, use this
Just a general comment.
The effort involved in getting this package together has to be commended.
I, for one, am very grateful for this.
The documentation is outstanding!

Even if you have no intention whatsoever of using this package,
at least browse through this page and look at the possibilities.

The available widgets and containers available is on the same level as Qt.

I would like to see this become a part of the python distribution.