next up previous contents index
Next: Simple Server in Perl Up: Server Previous: Simple Server in C   Contents   Index


Simple Server in Python

First read "Simple Server in C". Then you copy the files from the template to your directory. Under ./language_bindings you will find them. If you have installed swig http://www.swig.org you can rebuild the bindings using the shell scripts in this directory. There is a subdirectory for each script language. Under this there is a further subdirectory "id" for inetd and "mt" for multithreaded server. For better debugging start with the "mt" version. In this case you can see the prints from your language on the screen.

Figure 3.9: Create new python project
mkdir newdir
cd newdir
cp $PVBDIR/language_bindings/python/mt/* .
rm periodic.*

Now use designer to define a mask1.

Figure 3.10: Create python from Qt Designer
designer mask1.ui
ui2pvc mask1.ui mask1.py

In test.py you have to substitute periodic with mask1. Now run your server.

Figure 3.11: Run python
./test.py


next up previous contents index
Next: Simple Server in Perl Up: Server Previous: Simple Server in C   Contents   Index
Rainer Lehrig 2004-02-17