How to use the configparser.ConfigParser.write function in configparser

To help you get started, we’ve selected a few configparser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyKy / kivy-doc-ja / kivy / tools / report.py View on Github external
'squirtle',
          'PIL',
          'sdl2',
          'glew',
          'opencv',
          'opencv.cv',
          'opencv.highgui',
          'cython'):
    testimport(x)
report_dict['Libraries'] = report
report = []

title('Configuration')
s = StringIO()
from kivy.config import Config
ConfigParser.write(Config, s)
report.extend(s.getvalue().split('\n'))
report_dict['Configuration'] = report
report = []

title('Input availability')
from kivy.input.factory import MotionEventFactory
for x in MotionEventFactory.list():
    report.append(x)
report_dict['InputAvailablity'] = report
report = []

'''
title('Log')
for x in pymt_logger_history.history:
    report.append(x.message)
'''
github BillBillBillBill / Tickeys-linux / tickeys / kivy / tools / report.py View on Github external
'pyglet',
    'videocapture',
    'squirtle',
    'PIL',
    'opencv',
    'opencv.cv',
    'opencv.highgui',
    'cython'):
    testimport(x)
report_dict['Libraries'] = report
report = []

title('Configuration')
s = StringIO()
from kivy.config import Config
ConfigParser.write(Config, s)
report.extend(s.getvalue().split('\n'))
report_dict['Configuration'] = report
report = []

title('Input availability')
from kivy.input.factory import MotionEventFactory
for x in MotionEventFactory.list():
    report.append(x)
report_dict['InputAvailablity'] = report
report = []

'''
title('Log')
for x in pymt_logger_history.history:
    report.append(x.message)
'''
github kivy / kivy / kivy / tools / report.py View on Github external
'pyglet',
    'videocapture',
    'squirtle',
    'PIL',
    'opencv',
    'opencv.cv',
    'opencv.highgui',
    'cython'):
    testimport(x)
report_dict['Libraries'] = report
report = []

title('Configuration')
s = StringIO()
from kivy.config import Config
ConfigParser.write(Config, s)
report.extend(s.getvalue().split('\n'))
report_dict['Configuration'] = report
report = []

title('Input availability')
from kivy.input.factory import MotionEventFactory
for x in MotionEventFactory.list():
    report.append(x)
report_dict['InputAvailablity'] = report
report = []

'''
title('Log')
for x in pymt_logger_history.history:
    report.append(x.message)
'''
github steko / totalopenstation / totalopenstation / utils / upref.py View on Github external
def write(self):
        ''' override ConfigParser.write() method '''

        ConfigParser.write(self, open(self.upref, 'w'))
github NiceneNerd / BCML / bcml / util.py View on Github external
def write(self, fileobject):
        from io import StringIO
        buf = StringIO()
        ConfigParser.write(self, buf)
        config_str = re.sub(r'\[Preset[0-9]+\]', '[Preset]', buf.getvalue())
        fileobject.write(config_str)
github willemw12 / get_iplayer_downloader / src / get_iplayer_downloader / tools / config.py View on Github external
def write(self, file):
        #super(PropertiesConfigParser, self).write(PropertiesConfigParser.NoSectionHeader(file))
        ConfigParser.write(self, PropertiesConfigParser.NoSectionHeader(file))
github captin411 / ofxclient / ofxclient / config.py View on Github external
def write(self, *args):
        """See ConfigParser.write().  Also writes secure items to keystore."""
        ConfigParser.write(self, *args)
        if self.keyring_available:
            for key, thing in self._unsaved.items():
                action = thing[0]
                value = thing[1]
                if action == 'set':
                    keyring.set_password(self.keyring_name, key, value)
                elif action == 'delete':
                    try:
                        keyring.delete_password(self.keyring_name, key)
                    except:
                        pass
        self._unsaved = {}