Пример #1
0
 def __init__(self):
     LOGGING_LEVEL = logging.DEBUG if proxy.prefValue_('DebugMode') else logging.WARNING
     logging.basicConfig(level=LOGGING_LEVEL, format='%(levelname)s %(message)s')
     install_exception_hook()
     install_cocoa_logger()
     logging.debug('started in debug mode')
     cache_path = op.join(proxy.getCachePath(), 'moneyGuru')
     appdata_path = op.join(proxy.getAppdataPath(), 'moneyGuru')
     plugin_model_path = op.join(proxy.getResourcePath(), 'plugin_examples')
     currency_code = nonone(proxy.systemCurrency(), 'USD')
     logging.info('Currency code: {0}'.format(currency_code))
     try:
         system_currency = Currency(currency_code)
     except ValueError: # currency does not exist
         logging.warning('System currency {0} is not supported. Falling back to USD.'.format(currency_code))
         system_currency = USD
     date_format = proxy.systemShortDateFormat()
     logging.info('System date format: %s' % date_format)
     date_format = clean_format(date_format)
     logging.info('Cleaned date format: %s' % date_format)
     decimal_sep = proxy.systemNumberDecimalSeparator()
     grouping_sep = proxy.systemNumberGroupingSeparator()
     logging.info('System numeric separators: %s and %s' % (grouping_sep, decimal_sep))
     model = Application(self, date_format=date_format, decimal_sep=decimal_sep, 
         grouping_sep=grouping_sep, default_currency=system_currency, cache_path=cache_path,
         appdata_path=appdata_path, plugin_model_path=plugin_model_path)
     PyBaseApp.__init__(self, model)
Пример #2
0
 def __init__(self):
     core.pe.photo.PLAT_SPECIFIC_PHOTO_CLASS = Photo
     logging.basicConfig(level=logging.WARNING, format='%(levelname)s %(message)s')
     install_exception_hook('https://github.com/hsoft/dupeguru/issues')
     install_cocoa_logger()
     patch_threaded_job_performer()
     self.model = DupeGuru(self)
Пример #3
0
 def __init__(self):
     LOGGING_LEVEL = logging.DEBUG if proxy.prefValue_(
         'DebugMode') else logging.WARNING
     logging.basicConfig(level=LOGGING_LEVEL,
                         format='%(levelname)s %(message)s')
     install_exception_hook('https://github.com/hsoft/moneyguru/issues')
     install_cocoa_logger()
     logging.debug('started in debug mode')
     cache_path = op.join(proxy.getCachePath(), 'moneyGuru')
     appdata_path = op.join(proxy.getAppdataPath(), 'moneyGuru')
     currency_code = nonone(proxy.systemCurrency(), 'USD')
     logging.info('Currency code: {0}'.format(currency_code))
     try:
         system_currency = Currency(currency_code)
     except ValueError:  # currency does not exist
         logging.warning(
             'System currency {0} is not supported. Falling back to USD.'.
             format(currency_code))
         system_currency = USD
     date_format = proxy.systemShortDateFormat()
     logging.info('System date format: %s' % date_format)
     date_format = clean_format(date_format)
     logging.info('Cleaned date format: %s' % date_format)
     decimal_sep = proxy.systemNumberDecimalSeparator()
     grouping_sep = proxy.systemNumberGroupingSeparator()
     logging.info('System numeric separators: %s and %s' %
                  (grouping_sep, decimal_sep))
     model = Application(self,
                         date_format=date_format,
                         decimal_sep=decimal_sep,
                         grouping_sep=grouping_sep,
                         default_currency=system_currency,
                         cache_path=cache_path,
                         appdata_path=appdata_path)
     PyBaseApp.__init__(self, model)
Пример #4
0
 def _init(self, modelclass):
     logging.basicConfig(level=logging.WARNING, format='%(levelname)s %(message)s')
     install_exception_hook()
     install_cocoa_logger()
     patch_threaded_job_performer()
     appdata = proxy.getAppdataPath()
     self.model = modelclass(self, appdata)
Пример #5
0
 def __init__(self):
     logging.basicConfig(level=logging.WARNING, format='%(levelname)s %(message)s')
     cocoa.install_exception_hook()
     cocoa.install_cocoa_logger()
     self.progress = cocoa.ThreadedJobPerformer()
     model = App(self)
     PyBaseApp.__init__(self, model)
Пример #6
0
 def __init__(self):
     LOGGING_LEVEL = logging.DEBUG if proxy.prefValue_("DebugMode") else logging.WARNING
     logging.basicConfig(level=LOGGING_LEVEL, format="%(levelname)s %(message)s")
     install_exception_hook("https://github.com/hsoft/moneyguru/issues")
     install_cocoa_logger()
     logging.debug("started in debug mode")
     cache_path = op.join(proxy.getCachePath(), "moneyGuru")
     appdata_path = op.join(proxy.getAppdataPath(), "moneyGuru")
     currency_code = nonone(proxy.systemCurrency(), "USD")
     logging.info("Currency code: {0}".format(currency_code))
     try:
         system_currency = Currency(currency_code)
     except ValueError:  # currency does not exist
         logging.warning("System currency {0} is not supported. Falling back to USD.".format(currency_code))
         system_currency = USD
     date_format = proxy.systemShortDateFormat()
     logging.info("System date format: %s" % date_format)
     date_format = clean_format(date_format)
     logging.info("Cleaned date format: %s" % date_format)
     decimal_sep = proxy.systemNumberDecimalSeparator()
     grouping_sep = proxy.systemNumberGroupingSeparator()
     logging.info("System numeric separators: %s and %s" % (grouping_sep, decimal_sep))
     model = Application(
         self,
         date_format=date_format,
         decimal_sep=decimal_sep,
         grouping_sep=grouping_sep,
         default_currency=system_currency,
         cache_path=cache_path,
         appdata_path=appdata_path,
     )
     PyBaseApp.__init__(self, model)
Пример #7
0
 def _init(self, modelclass):
     logging.basicConfig(level=logging.WARNING,
                         format='%(levelname)s %(message)s')
     install_exception_hook()
     install_cocoa_logger()
     patch_threaded_job_performer()
     appdata = proxy.getAppdataPath()
     self.model = modelclass(self, appdata)
Пример #8
0
 def __init__(self):
     logging.basicConfig(level=logging.WARNING,
                         format='%(levelname)s %(message)s')
     cocoa.install_exception_hook()
     cocoa.install_cocoa_logger()
     self.progress = cocoa.ThreadedJobPerformer()
     model = App(self)
     PyBaseApp.__init__(self, model)
Пример #9
0
 def _init(self, modelclass):
     logging.basicConfig(level=logging.WARNING, format='%(levelname)s %(message)s')
     install_exception_hook('https://github.com/hsoft/dupeguru/issues')
     install_cocoa_logger()
     patch_threaded_job_performer()
     self.model = modelclass(self)
Пример #10
0
 def _init(self, modelclass):
     logging.basicConfig(level=logging.WARNING, format="%(levelname)s %(message)s")
     install_exception_hook()
     install_cocoa_logger()
     patch_threaded_job_performer()
     self.model = modelclass(self)