def open_to_file(self, schema, destination_file_path): self.e = TDEExport(destination_file_path, schema['columns'])
def open(self, schema): # Fairly ugly. We create and delete a temporary file while retaining its name with tempfile.NamedTemporaryFile(prefix="output", suffix=".tde", dir=os.getcwd()) as f: self.output_file = f.name print "Tmp file: %s" % self.output_file self.e = TDEExport(self.output_file , schema['columns'])