Skip to content

Instantly share code, notes, and snippets.

@suganoo
Last active September 5, 2017 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suganoo/2f1dca13c04a846a7bc92ae42504d336 to your computer and use it in GitHub Desktop.
Save suganoo/2f1dca13c04a846a7bc92ae42504d336 to your computer and use it in GitHub Desktop.
ConfigParserの使い方
[common]
hogehoge_param = "fugafuga"
[aws]
aws_key = aaddffeessdgggg
import ConfigParser
inifile = ConfigParser.SafeConfigParser()
inifile.read("xxxxxx/config.ini")
param = inifile.get("common", "hogehoge_param")
aws_key_id = inifile.get("aws","aws_key")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment