I have a temporary file with some content and a python script generating some output to this file. I want this to repeat N times, so I need to reuse that file (actually arra
You can do this:
def deleteContent(pfile): fn=pfile.name pfile.close() return open(fn,'w')