mirror of
				https://github.com/Telecominfraproject/oopt-gnpy.git
				synced 2025-10-31 10:07:57 +00:00 
			
		
		
		
	 c817ef7335
			
		
	
	c817ef7335
	
	
	
		
			
			I think that this SNR value represents the most important output of this example. There's plenty of debugging info on display already, so let's make this one more prominent. I was thinking about moving the highlighting to elements' each __str__() function, but that felt a bit like layering violation to me. I could have also changed just the transponder's __str__(). In the end, I think that repeating just the final GSNR at the link-end transponder makes most sense here. This is aligned with what we talked about at yesterday's (on 2019-09-18 -- note that this is a backport from #261) demo for Microsoft, after all.
		
			
				
	
	
		
			14 lines
		
	
	
		
			234 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			234 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| #!/usr/bin/env python3
 | |
| # -*- coding: utf-8 -*-
 | |
| 
 | |
| '''
 | |
| gnpy.core.ansi_escapes
 | |
| ======================
 | |
| 
 | |
| A random subset of ANSI terminal escape codes for colored messages
 | |
| '''
 | |
| 
 | |
| red = '\x1b[1;31;40m'
 | |
| cyan = '\x1b[1;36;40m'
 | |
| reset = '\x1b[0m'
 |