def guess_format(self, histfile):
    fp = open(histfile)
    for row in fp:
        if row.startswith('# 1:'):
            return KALLPATHS
        if (len(row.split()) == 1):
            return KSOAP
    return KMERYL
def guess_format(self, histfile):
    fp = open(histfile)
    for row in fp:
        if row.startswith('# 1:'):
            return KALLPATHS
        if (len(row.split()) == 1):
            return KSOAP
    return KMERYL