EasyManuals Logo
Home>Digi>Network Router>IX14

Digi IX14 User Manual

Digi IX14
828 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
Page #462 background imageLoading...
Page #462 background image
Applications Start an interactive Python session
IX14 User Guide
462
a. Log into the IX14 command line as a user with Admin access.
Depending on your device configuration, you may be presented with an Access selection
menu. Type admin to access the Admin CLI.
b. At the command line, use the scp command to upload the Python application script to the
IX14 device:
> scp host hostname-or-ip user username remote remote-path local
local-path to local
where:
n
hostname-or-ip is the hostname or ip address of the remote host.
n
username is the name of the user on the remote host.
n
remote-path is the path and filename of the file on the remote host that will be
copied to the IX14 device.
n
local-path is the location on the IX14 device where the copied file will be placed.
For example:
To upload a script from a remote host with an IP address of 192.168.4.1 to the
/etc/config/scripts directory on the IX14 device, issue the following command:
> scp host 192.168.4.1 user admin remote /home/admin/bin/test.py local
/etc/config/scripts/ to local
admin@192.168.4.1's password: adminpwd
test.py 100% 36MB 11.1MB/s 00:03
>
c. Type exit to exit the Admin CLI.
Depending on your device configuration, you may be presented with an Access selection
menu. Type quit to disconnect from the device.
Note You can also create scripts by using the vi command when logged in with shell access.
2. Log into the IX14 command line as a user with shell access.
Depending on your device configuration, you may be presented with an Access selection
menu. Type shell to access the device shell.
3. Use the python command to run the Python application. In the following example, the Python
application, test.py, takes 3 parameters: 120, ports and storage:
# python /etc/config/scripts/test.py 120 ports storage
Start an interactive Python session
Use the python command without specifying any parameters to start an interactive Python session.
The Python session operates interactively using REPL (Read Evaluate Print Loop) to allow you to write
Python code on the command line.
Note The Python interactive session is not available from the Admin CLI. You must access the device
shell in order to run Python applications from the command line. See Authentication groups for
information about configuring authentication groups that include shell access.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Digi IX14 and is the answer not in the manual?

Digi IX14 Specifications

General IconGeneral
BrandDigi
ModelIX14
CategoryNetwork Router
LanguageEnglish

Related product manuals