LOGGER = getLogger('filesystem') def __set_logger_level(level): """ Sets the logger level for filesystem logger. :param level: Level of logging. :type level: Integer """ LOGGER.setLevel(level) # TODO: Map when copy_file_to_project and copy_to_temporary_directory are called. diwavars.add_logger_initializer(__init_logger) diwavars.add_logger_level_setter(__set_logger_level) def copy_file_to_project(filepath, project_id): """ Copy file to project dir and return new filepath in project directory. :param filepath: The file path. :type filepath: String :param project_id: Project id from database. :type project_id: Integer :returns: The path for this file in project directory or empty string. :rtype: String
config.fileConfig('logging.conf') LOGGER = getLogger('graphicaldesign') def __set_logger_level(level): """ Sets the logger level for graphicaldesign logger. :param level: Level of logging. :type level: Integer """ LOGGER.setLevel(level) diwavars.add_logger_initializer(__init_logger) diwavars.add_logger_level_setter(__set_logger_level) class BlackOverlay(wx.Frame): """ Represents all black frame without a mouse. """ def __init__(self, pos, size, parent, text): wx.Frame.__init__(self, parent, wx.ID_ANY, '', pos=pos, size=size, style=0) # style=wx.STAY_ON_TOP) self.panel = wx.Panel(self, -1, size=size) pos = [x / 2 for x in wx.DisplaySize()] self.exit_label = wx.StaticText(self.panel, -1, label=text, style=wx.ALIGN_CENTER)