こすたろーんエンジニアの試行錯誤部屋

作成物の備忘録を書いていきますー

【configparser】How to read an array with python configparser

This article is a reminder of how to read arrays with python configparser

contents

スポンサーリンク

abstract

How to read an array with python configparser

1.requirement

Jetson Xavier NX
ubuntu18.04
Python 3.6.9

2.Contents of the target file to be read

list.ini

[LIST]
hoge=["hoge1", "hoge2", "hoge3"]

3.parse program

import configparser
config_ini = configparser.ConfigParser()
config_ini.read(path/to/list.ini, encoding='utf-8')

l = eval(config_ini.get("LIST", "hoge"))

スポンサーリンク

deeplearning related articles

technoxs-stacker.hatenablog.com technoxs-stacker.hatenablog.com technoxs-stacker.hatenablog.com

refarence

itips.krsw.biz