Skip to content

Instantly share code, notes, and snippets.

@mhoran
Last active July 11, 2019 15:35
Show Gist options
  • Save mhoran/0ffb1d33519152b3c844438b10ccefdb to your computer and use it in GitHub Desktop.
Save mhoran/0ffb1d33519152b3c844438b10ccefdb to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
try:
from configparser import RawConfigParser as ConfigParser
except ImportError:
from ConfigParser import ConfigParser
class T(ConfigParser):
def __init__(self, conf_dir=None):
ConfigParser.__init__(self, {"a": "False"})
self.thing = 10
def set(self, sec, k, v):
print("here")
print(self.thing)
return ConfigParser.set(self, sec, k, str(v))
t = T()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment