cancel
Showing results for 
Search instead for 
Did you mean: 

Python Scripts Directory

Python Scripts Directory

bw447
New Contributor III
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 16.1.3.6

Thanks!

4 REPLIES 4

bw447
New Contributor III
Thank you everyone for the help!

Dave_Hammers
Extreme Employee
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
16.2.3
21.1.3
22.2.1

Stephane_Grosj1
Extreme Employee
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.

Matthew_Helm1
Extreme Employee
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.

GTM-P2G8KFN