Skip to content

Commit

Permalink
Save local files as csv.
Browse files Browse the repository at this point in the history
I suspect the original impetus for .txt was the ability to open in Thonny,
but it's more useful to be explicit about the file format.
  • Loading branch information
Gadgetoid committed Apr 24, 2024
1 parent 17232ce commit 731ae87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion enviro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def get_sensor_readings():
def save_reading(readings):
# open todays reading file and save readings
helpers.mkdir_safe("readings")
readings_filename = f"readings/{helpers.date_string()}.txt"
readings_filename = f"readings/{helpers.date_string()}.csv"
new_file = not helpers.file_exists(readings_filename)
with open(readings_filename, "a") as f:
if new_file:
Expand Down

0 comments on commit 731ae87

Please sign in to comment.