Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 3.3

COLUMN

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
Resource File(s):

Download Icon 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.

Objectives

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 RBGUI command in the main application);

...End of Excerpt. Please purchase the magazine to read the full article.