Is this needed?
class Test: def __init__(self, f): self.f = open(f) def __del__(self): try: self.f.close() except: pass
Also, how can i open a file, and have it in append mode. However, if the file doesn't exist, python creates it?
Are you able to help answer this sponsored question?
Questions asked by members who have earned a lot of community kudos are featured in order to give back and encourage quality replies.