def __init__(self, index_file):
        if hasattr(index_file, 'readline') and hasattr(index_file, 'tell'):
            self.fh = index_file
        else:
            self.fh = open(index_file, 'w')

        self.writer = _csv.writer(self.fh, lineterminator="\n")
Constructor.
dataset/ETHPy150Open drkjam/netaddr/netaddr/eui/ieee.py/FileIndexer.__init__