IPC Sockets, Part 2
Producing a usable IPC socket framework
Issue: 3.3 (January/February 2005)
Author: Didier Barbas
Author Bio: Didier has been a dilettante programmer and linguist for more than 20 years. Unusual for a Frenchman, he speaks 11 languages, including Korean and PowerPC machine-language.
Article Description: No description available.
Article Length (in bytes): 9,729
Starting Page Number: 46
Article Number: 3322
3322.zip Updated: 2013-03-11 19:07:58
Related Link(s): None
Excerpt of article text...
In last issue's column, we learned about the basics of IPC sockets, and how we could implement a skeleton framework providing GUI services for Python applications. We will now push the idea beyond the proof of concept stage, and produce a less theoretical and much more usable framework.
To make it more (re)usable, we will split the Python code: a Python module that implements GUI objects and IPC connectivity, and a sample test application that will make use of this Python framework. You will remember that in the last column, we had only one Python file that served as a test program and also implemented the communication process between the Python script and the RB framework. This was good enough for a test script demonstrating the functionalities of IPCSocket control. Now, if we want to get serious about this, we should provide the Python equivalent of RB's classes and modules -- same OOP logic, albeit in a less ordered, graphical, fashion.
For each GUI control we want to implement, we'll have to write a class that implements various behaviors. For the end-user, creating GUI controls should be as simple as
w=RBWindow(...). All the IPC wizardry will be done behind the scenes, in the Python framework.
Communication between the 2 frameworks (RB & Python) will follow the same basic principles:
import RBGUIcommand in the main application);
...End of Excerpt. Please purchase the magazine to read the full article.