|  |  |  | @ -29,7 +29,7 @@ def popcount(a):@@ -29,7 +29,7 @@ def popcount(a): | 
			
		
	
		
			
				
					|  |  |  |  | def readtext(file): | 
			
		
	
		
			
				
					|  |  |  |  |     """Reads and returns the text in a given file. Transparently decompresses \\*.gz files.""" | 
			
		
	
		
			
				
					|  |  |  |  |     if hasattr(file, 'read'): | 
			
		
	
		
			
				
					|  |  |  |  |         return file.read() | 
			
		
	
		
			
				
					|  |  |  |  |         return file.read().decode() | 
			
		
	
		
			
				
					|  |  |  |  |     if str(file).endswith('.gz'): | 
			
		
	
		
			
				
					|  |  |  |  |         with gzip.open(file, 'rt') as f: | 
			
		
	
		
			
				
					|  |  |  |  |             return f.read() | 
			
		
	
	
		
			
				
					|  |  |  | 
 |