From ed5780a5f91b624fc79c6b1d2f92b6002f658a2c Mon Sep 17 00:00:00 2001 From: internetlandlord Date: Fri, 21 Oct 2022 17:42:28 +0000 Subject: Added functionality to inputoutput to create a -sorted file keeping original CSV --- inputoutput.py | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v1.2.3