Manage Python Applications; Python Files Page - Digi TransPort WR31 User Manual

Hide thumbs Also See for TransPort WR31:
Table of Contents

Advertisement

Manage applications

Manage Python applications

Some Digi TransPort routers support the Python scripting language. Python allows users to extend
and enhance the basic functionality of the router through programming. The routers contain a
Python interpreter you can invoke from the command line. This is 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. For more information on Python programming see the Digi Python Programmer's Guide
on www.digi.com.

Python Files page

To manage Python application files, go to Applications > Python > Python Files.
This page has the following settings:
Module search path
The search path for Python modules that are not in the default search path. Specify multiple
locations by separating pathnames with colons, such as pymod1.zip:python21.zip. This causes
the interpreter to search for two compressed files pymod1.zip and python21.zip. TransPort
routers have a flat filing system structure that does not support subdirectories.
Redirect the Python output to debug
Allows the redirection of the stdout file handle to the debug output (stderr) file handle. The
default for this parameter is Off. The easiest way to see this redirection in action is to issue the
command to start the Python interpreter from a debug/CLI terminal. Note that the screen
remains blank. Stop the interpreter (using the exit() command), set this parameter to On, and
re-issue the command to start the interpreter. This time, the familiar Python welcome message
and prompt should appear on the console.
Unbuffered output to stdout
Redirects unbuffered output to file handle to the debug output (stderr) file handle.
Digi TransPort WR Routers User Guide
Manage Python applications
742

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents