Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'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)
'''
'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)
'''
'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)
'''
def write(self):
''' override ConfigParser.write() method '''
ConfigParser.write(self, open(self.upref, 'w'))
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)
def write(self, file):
#super(PropertiesConfigParser, self).write(PropertiesConfigParser.NoSectionHeader(file))
ConfigParser.write(self, PropertiesConfigParser.NoSectionHeader(file))
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 = {}