Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F53428916
testCsvReader.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
692 B
Referenced Files
None
Subscribers
None
testCsvReader.py
View Options
#!/usr/bin/python
from
csvReader
import
*
#-----------------------------------
# Management of arguments
#-----------------------------------
import
argparse
parser
=
argparse
.
ArgumentParser
(
description
=
'test of cvsReader: takes CSV files as argument; pretty-print them in standard output.'
)
# positional argument
parser
.
add_argument
(
"infiles"
,
nargs
=
'+'
,
help
=
"filenames of the CSV files against which to test csvReader."
)
args
=
parser
.
parse_args
()
# -----------------------------------
# Main
# -----------------------------------
for
infile
in
args
.
infiles
:
#csvData = open(infile, 'r').read()
csvData
=
csvReader
(
infile
)
csvData
.
prettyPrint
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Sun, Oct 11, 21:16 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4172999
Default Alt Text
testCsvReader.py (692 B)
Attached To
Mode
rTASACORAEXP Tasacora experimental code
Attached
Detach File
Event Timeline
Log In to Comment