I am writing a QGIS Python Plugin. I am trying to write data to a file using
with open("filename.txt", "w") as f:
f.write("file text.")
QMessageBox.information(None, "Test", "Written to file.")
It runs the above and displays the message but it does not write to the file. Why is it not writing to the file? No exceptions are raised.
Thank-you in advance.