LoginSignup
6
6

More than 5 years have passed since last update.

Pythonでconfig.iniを使う

Last updated at Posted at 2013-01-17
aws.py

    import ConfigParser

    inifile = ConfigParser.SafeConfigParser()
    inifile.read("./config.ini")
    aws_access_key_id = unicode(inifile.get("aws","access_key_id"))
    aws_secret_access_key = unicode(inifile.get("aws","secret_access_key"))
config.ini

    [aws]
    access_key_id = xxxxxxxx
    secret_access_key = yyyyyyyy
6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6