zoukankan      html  css  js  c++  java
  • 配置文件模块

    
    # import configparser
    #
    # config = configparser.ConfigParser()
    #
    #
    # # config["DEFAULT"] = {'ServerAliveInterval': '45',
    # #                      'Compression': 'yes',
    # #                      'CompressionLevel': '9'}
    # #
    # # config['bitbucket.org'] = {'User':'hg'}
    # #
    # # config['topsecret.server.com'] = {}
    # # topsecret = config['topsecret.server.com']
    # # topsecret['Host Port'] = '50022'  # mutates the parser
    # # topsecret['ForwardX11'] = 'no'  # same here
    # # config['DEFAULT']['ForwardX11'] = 'yes'
    # #
    # #
    # #
    # # with open('example.ini', 'w') as configfile:
    # #     config.write(configfile)
    #
    # # print(config.sections())
    #
    # config.read('example.ini')
    # # print(config.sections())
    # # print(config.defaults())
    # #
    # # print(config['bitbucket.org']['User'])
    #
    # # for key in config['bitbucket.org']:
    # #     print(key)
    #
    # config.remove_section('topsecret.server.com')
    # print(config.has_section('topsecret.server.com'))
    #
    # config.remove_option('bitbucket.org','user')
    #
    # # config.set('bitbucket.org','user','alex')
    #
    #
    # config.write(open('example.ini', "w"))
    人生短短数十载,经不起几次重头再来
  • 相关阅读:
    hlg1541集合划分【01背包】
    HLG1067QQ Farm【状压dp】
    作业。。
    HDU3602 2012【dp】
    hdu 1233(最小生成树 prim算法)
    hdu 2988(最小生成树 kruskal算法)
    hdu 1272
    hdu 1213(并查集模版题)
    hdu 2846(字典树)
    hdu 1075(字典树)
  • 原文地址:https://www.cnblogs.com/bk770466199/p/5862735.html
Copyright © 2011-2022 走看看