summaryrefslogtreecommitdiff
path: root/contrib/non-profit-audit-reports/readcsv.py
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-12-04 12:26:04 +0100
committerAlexis Hildebrandt <afh@surryhill.net>2023-12-04 12:26:04 +0100
commit2a452853224e3a9a8a516c5e5b105b2738b6912f (patch)
tree1f3c74b1b55ff4b08cded192389d6fa36cd5125d /contrib/non-profit-audit-reports/readcsv.py
parent3d22ddc7e67a06d0bdf2994b1ef018bc46e92f34 (diff)
downloadfork-ledger-2a452853224e3a9a8a516c5e5b105b2738b6912f.tar.gz
fork-ledger-2a452853224e3a9a8a516c5e5b105b2738b6912f.tar.bz2
fork-ledger-2a452853224e3a9a8a516c5e5b105b2738b6912f.zip
Migrate Python scripts to Python 3
Update ooolib-python to 0.1.0
Diffstat (limited to 'contrib/non-profit-audit-reports/readcsv.py')
-rwxr-xr-xcontrib/non-profit-audit-reports/readcsv.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/non-profit-audit-reports/readcsv.py b/contrib/non-profit-audit-reports/readcsv.py
index 67fc5663..932b4df9 100755
--- a/contrib/non-profit-audit-reports/readcsv.py
+++ b/contrib/non-profit-audit-reports/readcsv.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
# readcsv.py
# CSV reading technical study
#
@@ -23,9 +23,9 @@ import csv
dialects = csv.list_dialects()
for dialect in dialects:
- print 'dialect %s' % str(dialect)
+ print(f'dialect {dialect}')
-csvfile = open('tests/general-ledger.csv', 'rb')
+csvfile = open('test/general-ledger.csv', 'rb')
reader = csv.reader(csvfile, delimiter=',', quotechar='"')
for row in reader:
- print row
+ print(row)