diff options
author | internetlandlord <f.fredhenry@gmail.com> | 2022-10-21 17:42:28 +0000 |
---|---|---|
committer | internetlandlord <f.fredhenry@gmail.com> | 2022-10-21 17:42:28 +0000 |
commit | ed5780a5f91b624fc79c6b1d2f92b6002f658a2c (patch) | |
tree | cd1da8207e8f6c473f4cefa187b998a51beb9303 | |
parent | 0bb0d85ea047871749005223b088b42196da5d5e (diff) |
Added functionality to inputoutput to create a -sorted file keeping original CSV
-rwxr-xr-x | inputoutput.py | 5 |
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) |