def __init__(self, f): if type(f) == type(''): import __builtin__ f = __builtin__.open(f, 'rb') self.initfp(f)