# -*-coding:utf-8-*-
__author__ = "logan.xu"

#写配置文件
import configparser

config = configparser.ConfigParser()

config["DEFAULT"] = {'ServerAliveInterval': '45',
'Compression': 'yes',
'CompressionLevel': '9'}

config['bitbucket.org'] = {}
config['bitbucket.org']['User'] = 'hg'

config['topsecret.server.com'] = {}
topsecret = config['topsecret.server.com']
topsecret['Host Port'] = '50022'
topsecret['ForwardX11'] = 'no'

config['DEFAULT']['ForwardX11'] = 'yes'
with open('example.ini', 'w') as configfile:
config.write(configfile)

相关文章:

  • 2022-01-03
  • 2022-12-23
猜你喜欢
  • 2021-11-15
  • 2021-10-25
  • 2021-09-23
  • 2021-07-14
相关资源
相似解决方案