summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinternetlandlord <f.fredhenry@gmail.com>2022-10-21 17:42:28 +0000
committerinternetlandlord <f.fredhenry@gmail.com>2022-10-21 17:42:28 +0000
commited5780a5f91b624fc79c6b1d2f92b6002f658a2c (patch)
treecd1da8207e8f6c473f4cefa187b998a51beb9303
parent0bb0d85ea047871749005223b088b42196da5d5e (diff)
Added functionality to inputoutput to create a -sorted file keeping original CSV
-rwxr-xr-xinputoutput.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/inputoutput.py b/inputoutput.py
index da22d12..0f0b94a 100755
--- a/inputoutput.py
+++ b/inputoutput.py
@@ -27,6 +27,11 @@ def ingressCSV(location):
# No returned value(s), only closes a file
def egressCSV(row,location):
+
+ # create a new file with -sorted
+ location = location[:-4]+"-sorted"+location[-4:]
+
+
f = open(location,'w')
writehead = csv.writer(f)