python

Purpose

Manually executes a Python program from the command line. The python command is similar to a command executed on a PC. However, other than a program name and arguments for the program, the command takes no arguments itself, and is currently unable to spawn an interactive session.

Required permissions

For Digi products with two or more users, permissions must be set to set permissions python-cmd=execute for a user to use this command. The python-files permission is a separate permission that controls access to Python programs in the Python directory for the Digi device, but does not impact execution of this command. See set permissions for details on setting user permissions for commands.

Syntax

python [(TFTP server ip):]filename [program arguments...]

Options

[(TFTP server ip):]filename

The main file to be executed. This file can be either a file on the file system accessed through the Web UI, or a file accessible through a TFTP server on the network. This TFTP functionality reduces the number of times that you may need to place a program on the file system while developing and refining functionality. However, the TFTP behavior only works for the main program. Modules and packages must still be present on the file system to be used.

program arguments...

Arguments to be supplied to the program, as needed.

Example

#> python EmbeddedKitService.py
#> py dia.py

See also

http://www.digi.com/wiki/developer/index.php/Main_Page

http://www.digi.com/technology/drop-in-networking/python.jsp

http://www.digi.com/support/forum/forum.jspa?forumID=104