fork download
  1. import os
  2. import sys
  3.  
  4. try:
  5. from ConfigParser import RawConfigParser
  6. except ImportError:
  7. from configparser import RawConfigParser
  8.  
  9. p = RawConfigParser()
  10. p.readfp(sys.stdin)
  11. p.write(sys.stdout)
  12.  
  13. print('set option')
  14. p.set('global', 'optname', 'value')
  15. p.write(sys.stdout)
Success #stdin #stdout 0.02s 5908KB
stdin
### This file specifies server-specific parameters,
### including HTTP proxy information, HTTP timeout settings,
### and authentication settings.
[groups]
# group1 = *.collab.net

[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
stdout
[groups]

[global]

set option
[groups]

[global]
optname = value