标签:amp user ini import igp port forward level int
import configparserconfig = configparser.ConfigParser()
config[‘DEFAULT‘] = {
‘ServerAliveInterval‘: ‘45‘,
‘Compression‘: ‘yes‘,
‘CompressionLevel‘: ‘9‘
}
config[‘bitbucket.org‘] = {}
config[‘bitbucket.org‘][‘User‘] = ‘hg‘
config[‘topsecret.server.com‘] = {}
config[‘topsecret.server.com‘][‘Port‘] = ‘50022‘
config[‘topsecret.server.com‘][‘ForwardX11‘] = ‘no‘
config[‘DEFAULT‘][‘ForwardX11‘] = ‘yes‘
with open(‘example1.ini‘, ‘w‘) as configfile:
.......config.write(configfile)
标签:amp user ini import igp port forward level int
原文地址:http://blog.51cto.com/3906249/2296443