EasyManua.ls Logo

Digi TransPort LR54 - Run an Interactive Python Session; Configure a Python Application to Run Automatically at Startup

Digi TransPort LR54
512 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Services and applications Python
Digi TransPort WR Routers User Guide
153
To stop a Python application:
1. Determine the Python application ID using the show python command.
2. Enter the python stop command with the Python application ID.
For example:
digi.router > show python
ID File Name Arguments
------------------------------------------------------------------------
4990 health.py 120 ports storage
4993 scripts/python/traffic.py 300 --quiet
digi.router >
digi.router > python stop 4990
Stopped: 4990 'health.py'
digi.router >
Run an interactive Python session
Command line
You can use the python command to run an interactive Python session from within the current
CLIcommand session. This allows you to test Python commands on the device while developing a
Python application.
1. Use the python command with no parameters to enter an interactive Python session:
digi.router> python
Python 3.5.3
>>>
2. Use Ctrl-D or python stop to exit the Python session. For information about using python stop,
see Stop a Python application.
Configure a Python application to run automatically at startup
You can configure TransPort device to automatically run a Python application when the device
restarts. Up to four Python scripts can be configured to run automatically at startup.
Upload Python application scripts to the TransPort device using the Web UI File System page or
applications such Filezilla, SFTP or SCP; see Upload and download files for information about
uploading files. Python applications can stored in a different directory as required; for example, you
can create a scripts directory using the mkdir command, and store your uploaded Python applications
in this directory.
Required configuration items
n Upload the Python script to be run.
n Enable the Python script.

Table of Contents

Other manuals for Digi TransPort LR54

Related product manuals