How to get specific col value from csv

Asked by Shota Makino

I am trying to create Sikuli script which configure WLAN pre-shared key every day on Web GUI.

The source CSV is fixed as below,
[Sample CSV]
DATE,PASSWD
2016/1/1,3q7uxd64
2016/1/2,7jqw263a
2016/1/3,7z45a8ed
2016/1/4,3aj5d8w2
2016/1/5,r9647ezg
2016/1/6,h7w52x4d
...

I think it can be achieved with module "csv" and "Dictreader"

Anyone please give me a advise.
Thank you!

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :
#1

I recomend to read from csv-file into list-object .
(CSVファイルから読み出して、リストオブジェクトに格納するのがいいと思います。

Revision history for this message
Shota Makino (smakino) said :
#2

Thank you Masuo-san.

I will try. with csv.reader.
Refards,

Revision history for this message
masuo (masuo-ohara) said :
#3

If you want to use Dictreader, Python documentation is here.
https://docs.python.org/2.7/library/csv.html

Can you help with this problem?

Provide an answer of your own, or ask Shota Makino for more information if necessary.

To post a message you must log in.