PythonD offers full BSD-style network connectivity via its built-in `socket´ and `select´ modules. PythonD socketmodule uses WATT32 technology for its net interface. Staring with PythonD 2.2.1.R2.0, the `errno´ module also has been upgraded with many BSD socket exceptions. Before PythonD networking can function, it must be configured. PythonD networking also requires a DOS packet driver running.
If you are running PythonD under Windows NT 4.x, 2000 or XP, we recommend using
from Software Sytems. Alternatively,
There is the slower,
commercial virtual packet driver from Dan Lanciani
for both Windows 9x and NT systems.
Configuring PythonD Networking:
Socketmodule has been built with Watt32 and requires wattcp.cfg to function. The DJGPP default installation directory for this file is $DJDIR/etc, but it can be at any location defined by the system variable %WATTCP.CFG%. Defining %WATTCP.CFG% is mandatory regardless of your installation. Additional files may be needed at the location defined by %ETC%. Beginning with PythonD 2.2.1 R2, these are included as part of the base PythonD distribution, found on the general download page.
BSD style Networking module:
Use of the PythonD `socketmodule´ requires installation of a running DOS packet driver. When `socket´ is imported, Wattcp´s sock_init() function is immediately called. Most socket functions will not return correct information
until this is done(i.e. gethostname). The disadvantage is that importing `socket´ without a running packet driver may cause PythonD to immediately shut down. If you do not have a networking card, but still want `socketmodule´, you should install a nulpacket driver. Note that PythonD socketmodule implementation is also not capable of
asynchronous connections. This may be improved in the future. There are a few examples ported to PythonD and included in the distribution,
demonstrating the use of `socketmodule´.
Your mileage will vary, depending on your packet driver, wattcp.cfg configuration, and OS.
For additional networking tools,
CADDIT engineering/IT pages.