mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			284 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			284 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/python3
 | 
						|
 | 
						|
asciiBinFile = 'ram.txt'
 | 
						|
binFile = 'ram.bin'
 | 
						|
 | 
						|
asciiBinFP = open(asciiBinFile, 'r')
 | 
						|
binFP = open (binFile, 'wb')
 | 
						|
 | 
						|
for line in asciiBinFP.readlines():
 | 
						|
    binFP.write(int(line, 16).to_bytes(8, byteorder='little', signed=False))
 | 
						|
 | 
						|
asciiBinFP.close()
 | 
						|
binFP.close()    
 |