def __init__(self, filename):
    self.filename = filename
    self.temp = tempfile.NamedTemporaryFile(delete=False)
def __init__(self, filename):
    self.filename = filename
    self.temp = tempfile.NamedTemporaryFile(delete=False)