Skip to content
Snippets Groups Projects
Commit 3452bec2 authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

use csv.DictReader

parent 72d06f63
No related branches found
No related tags found
No related merge requests found
...@@ -172,6 +172,11 @@ def entete_xml(fd): ...@@ -172,6 +172,11 @@ def entete_xml(fd):
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def codeRoscop(file): def codeRoscop(file):
print("Code roscop file: %s" % code_roscop) print("Code roscop file: %s" % code_roscop)
with open(code_roscop, 'rt') as f:
reader = csv.DictReader(f, delimiter=';')
for row in reader:
print("%s : %s : %s : %s : %s" % (row['key'], row['long_name'],
row['standard_name'], row['units'], row['format']))
sys.exit() sys.exit()
# display help with no arg on command-line # display help with no arg on command-line
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment