Most of what I do is embedded control code in C++, and mostly for Windows, but it’s becoming more frequent for customers to want Linux.The apps tend to be 2/3 control logic and about 1/3 user interface. But writing the user interface in C++ is not much fun and in general is not portable. At first, I considered doing the GUI in C#, but connecting C# to complex C++ is a mess and another portability problem. Then I ran across an article on WxPython.
My control logic is in the form of a C++ singleton class. At instantiation (by the GUI), it reads configuration data, creates a hierarchical state machine, and starts multiple worker threads. So most of the time-critical stuff is disconnected from the GUI (as long as the GUI doesn’t hog the CPU). The GUI is typically pretty simple, polling the control logic every 100 or 200 millisecs with start/stop/status type requests and displaying the results. The GUI also supplies an asynchronous callback that facilitates display of error screens, etc, although this could also be done by polling.
So after that long-winded-but-short-on-details explanation of the application, my questions are:
- does WxPython seem like a good fit for the user interface portion? i.e easy linking to C++ DLL.
- Could I expect decent performance for a “simple” GUI on a low end PC? I know this is subjective, but say compared to C#?
- Assuming that I get the C++ to port cleanly to Linux, could I expect an easy port of the Python?
- Best “get started” book for moving from C++ to Python?
Thanks in advance!