def openFile(path): try: myFile = open(path) except Exception as e: print(e) pass return myFile def closeFile(fileObj): try: fileObj.close() except Exception as e: print(e) pass