Python Scripts Directory
						
					
					
				
			
		
	
			
	
	
	
	
	
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎04-12-2017 04:08 PM
			
				
					
					
						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!
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
I'm running ExOS 16.1.3.6
Thanks!
		4 REPLIES 4
	
		
		
			
			
			
					
	
			Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎04-13-2017 10:20 AM
			
				
					
					
						Thank you everyone for the help!
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎04-12-2017 08:03 PM
			
				
					
					
						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
		
		
	
	
	
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
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎04-12-2017 06:05 PM
			
				
					
					
						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.
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎04-12-2017 04:32 PM
			
				
					
					
						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.