Header Only - DO NOT REMOVE - Extreme Networks

Python Scripts Directory

Userlevel 2
I'm starting to get a number of pythons scripts on my switches/stacks. From what I can tell if I create a directory and move the scripts into it I'm not able to execute them. Even if I cd into the directory, I'm still not able to run them. It looks like they have to be in the /usr/local/cfg directory. I just want to make sure that I'm not missing anything.

I'm running ExOS


4 replies

Userlevel 4
The run script and load script will expect the target script file to be in the directory you are currently in. So, if I cd into a subdirectory off of /usr/local/cfg and then run script {filename.py}, that script will be executed. However, were I to cd back to the /usr/local/cfg directory, and try that same command, I will get a file not found error, or even if I run script ./{subfolder}/{filename.py}, that will give me an invalid filename error.
Userlevel 7
That has been fixed in 16.2.2p1-3 (or whatever the patch number was), so it's also available with latest 16.2.3.
Userlevel 5
Stephane is correct:
The bug tracker number for:
xos0066610 run script python does not look in the current working directory for scripts
is fixed in
Userlevel 2
Thank you everyone for the help!