You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							23 lines
						
					
					
						
							492 B
						
					
					
				
			
		
		
	
	
							23 lines
						
					
					
						
							492 B
						
					
					
				| #!/usr/bin/env python3
 | |
| 
 | |
| import sys
 | |
| import subprocess
 | |
| from tools.lib.route import Route
 | |
| from tools.lib.url_file import URLFile
 | |
| 
 | |
| def juggle_segment(route_name, segment_nr):
 | |
|   
 | |
|   r = Route(route_name)
 | |
|   lp = r.log_paths()[segment_nr]
 | |
| 
 | |
|   if lp is None:
 | |
|     print("This segment does not exist, please try a different one")
 | |
|     return
 | |
| 
 | |
|   uf = URLFile(lp)
 | |
|   
 | |
|   subprocess.call(f"bin/plotjuggler -d {uf.name}", shell=True)
 | |
| 
 | |
| 
 | |
| if __name__ == "__main__":
 | |
|   juggle_segment(sys.argv[1], int(sys.argv[2]))
 | |
| 
 |