Python applications
Python Files
Some of the Digi TransPort routers support the Python scripting language which gives users the
facility to extend and enhance the basic functionality of the router. The routers contain a Python
interpreter which may be invoked from the command line. This can be useful for developing
scripts. The more usual way to use Python is to write a script to implement a required function
and to run this script autonomously. It is common practice for python scripts to use the file
extension ".py", such as "myscript.py". A Python script is a text file containing python commands
and may be created using a normal plain text editor. Python is a powerful language and obtains
some of its power from the many modules that are available for it. A description of the Python
language is outside the scope of this manual.
Module search path
The parameter in this text entry box sets the search path for Python modules that are not in
the default search path. Multiple locations may be specified by separating pathnames with
colons, such as "pymod1.zip:python21.zip". This will cause the interpreter to search for the
two compressed files pymod1.zip and python21.zip. Note that TransPort routers have a flat
filing system structure that does not support subdirectories.
Redirect the Python output to debug
When checked, this checkbox allows the redirection of the stdout file handle to the debug
output (stderr) file handle. The default state of this parameter is "Off". The easiest way to see
Digi TransPort User Guide
447
Need help?
Do you have a question about the TransPort and is the answer not in the manual?