Hi,
I would like to have the output of the script grove_temperature_humidity_sensor_sht3x.py to a file.
Can anybody help me?
Kind regards
Remco
Hi Remco
For how to save the message to file, please refer to <LINK_TEXT text=“https://www.pythonforbeginners.com/file … -in-python”>https://www.pythonforbeginners.com/files/reading-and-writing-files-in-python</LINK_TEXT> thanks.
[code]
file = open(“testfile.txt”,”w”)
file.write(“Hello World”)
file.write(“This is our new text file”)
file.write(“and this is another line.”)
file.close() [/code]
Thanks that helped!