aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDat Nguyen <nguy2854@umn.edu>2019-11-21 15:41:40 -0600
committerDat Nguyen <nguy2854@umn.edu>2019-11-21 15:41:40 -0600
commit6e4a89f2fa5adb3137b4f9abdfddc2d6301b936e (patch)
tree7d48cfea55ff53c4433f2416a3610cd0e0d98f2a
parentUpdate Server.py (diff)
downloadee4511w-6e4a89f2fa5adb3137b4f9abdfddc2d6301b936e.tar
ee4511w-6e4a89f2fa5adb3137b4f9abdfddc2d6301b936e.tar.gz
ee4511w-6e4a89f2fa5adb3137b4f9abdfddc2d6301b936e.tar.bz2
ee4511w-6e4a89f2fa5adb3137b4f9abdfddc2d6301b936e.tar.lz
ee4511w-6e4a89f2fa5adb3137b4f9abdfddc2d6301b936e.tar.xz
ee4511w-6e4a89f2fa5adb3137b4f9abdfddc2d6301b936e.tar.zst
ee4511w-6e4a89f2fa5adb3137b4f9abdfddc2d6301b936e.zip
changed to .csv
-rw-r--r--Web/PI/PI.py4
-rw-r--r--Web/Server/Server.py2
-rw-r--r--Web/test.py2
3 files changed, 5 insertions, 3 deletions
diff --git a/Web/PI/PI.py b/Web/PI/PI.py
index b607f76..a6a597b 100644
--- a/Web/PI/PI.py
+++ b/Web/PI/PI.py
@@ -29,7 +29,7 @@ def my_test_endpoint():
# Get results file
results_filename = filename.split(".")[0]
- results_filename = results_filename + "_results"
+ results_filename = results_filename + "_results.csv"
with open(RESULTS_DESTINATION + results_filename, 'r') as results:
results_content = results.read()
results.close()
@@ -44,3 +44,5 @@ def my_test_endpoint():
if __name__ == '__main__':
app.run(host="localhost", port=8000)
+ # UNCOMMENT IF RUNNING PI.PI ON PI
+ #app.run(host="192.168.1.10", port=8000)
diff --git a/Web/Server/Server.py b/Web/Server/Server.py
index 3e93d00..a936b96 100644
--- a/Web/Server/Server.py
+++ b/Web/Server/Server.py
@@ -19,7 +19,7 @@ PI_URL = 'http://localhost:8000'
# UNCOMMENT IF RUNNING PI.PY ON PI
#PI_URL = 'http://192.168.1.10:8000'
-RESULTS_DESTINATION = "Results/results.txt"
+RESULTS_DESTINATION = "Results/results.csv"
def allowed_file(filename):
return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
diff --git a/Web/test.py b/Web/test.py
index 634bc84..8c15f58 100644
--- a/Web/test.py
+++ b/Web/test.py
@@ -9,7 +9,7 @@ now = datetime.now()
current_time = now.strftime("%H:%M:%S")
print("Current Time = " + current_time)
-f = open("Results/" + file_name + "_results", "w+")
+f = open("Results/" + file_name + "_results.csv", "w+")
f.write("THIS IS RESULTS TEXT\n")
f.write("Current Time = " + current_time)
f.close()