19.2.5 Installing script files
Install the script file. Resident scripts and event startup scripts start the installed script file. The installed script file can also be imported as a Python module.
Script files that can be installed have the following conditions:
-
Script files can be installed with one of the following extensions:
-
.py
-
.pyc
-
.pyo
-
-
You cannot install a script file that differs only in extension from the installed script file.
The following table lists the limits for installing script files.
Item |
Upper Limit |
---|---|
Number of files that can be installed |
100 |
Total file size |
4MB |
Size of one file |
512KB |
Use the operation-command install script to install the script file. The following diagram shows an example of installing sample.py file using install script command.
# install script sample.py ..1 # show script installed-file ..2 Date 20XX/01/15 20:32:35 UTC Total: 1 files, 100 bytes name: sample.py size: 100 bytes MD5: 12f58123c2b0f4286cf6d607656207c3 # |
-
Install sample.py file on the Switch.
-
Check the script file installed on the Switch.