parameters: (self,fn)
docstring: Read a histogram file and return a dictonary of the histogram. Removes \t(utf16=...)
docstring_summary: Read a histogram file and return a dictonary of the histogram. Removes \t(utf16=...)
docstring_tokens: Read a histogram file and return a dictonary of the histogram . Removes \ t ( utf16 = ... )
function: def read_histogram_entries(self,fn):
          """Read a histogram file and return a dictonary of the histogram. Removes \t(utf16=...) """
          import re
          r = re.compile(b"^n=(\d+)\t(.*)$")
          for line in self.open(fn,'r'):
              # line = line.decode('utf-8')
              m = r.search(line)
              if m:
                  k = m.group(2)
                  p = k.find(b"\t")
                  if p>0: k = k[0:p]
                  yield (k,int(m.group(1)))
function_tokens: def read_histogram_entries ( self , fn ) : import re r = re . compile ( b"^n=(\d+)\t(.*)$" ) for line in self . open ( fn , 'r' ) : # line = line.decode('utf-8') m = r . search ( line ) if m : k = m . group ( 2 ) p = k . find ( b"\t" ) if p > 0 : k = k [ 0 : p ] yield ( k , int ( m . group ( 1 ) ) )