mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	There is so much templating going on that compiling wrappers.cc now takes 1m1.668s on an Apple M4…
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			310 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			310 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import os
 | |
| import sys
 | |
| 
 | |
| from pyosys import libyosys as ys
 | |
| 
 | |
| print(ys)
 | |
| 
 | |
| ys.log("Hello, world!\n")
 | |
| 
 | |
| from pyosys.libyosys import log
 | |
| 
 | |
| print(log)
 | |
| 
 | |
| log("Goodbye, world!\n")
 | |
| 
 | |
| import pyosys
 | |
| 
 | |
| if os.path.basename(sys.executable) == "yosys":
 | |
| 	# make sure it's not importing the directory
 | |
| 	assert "built-in" in repr(pyosys)
 |