예제 #1
0
    def __init__(self, **config):
        GenPollUrl.__init__(self, **config)
        self.add_defaults(BitcoinTicker.defaults)

        # set up USD as the default if no locale is set
        if self.currency == "":
            locale.setlocale(locale.LC_MONETARY, "en_US.UTF-8")
            self.currency = locale.localeconv()['int_curr_symbol'].strip()
        self.symbol = locale.localeconv()['currency_symbol']
예제 #2
0
    def __init__(self, **config):
        GenPollUrl.__init__(self, **config)
        self.add_defaults(CryptoTicker.defaults)

        # set up USD as the currency if no locale is set
        if self.currency == "":
            self.currency = 'USD'
        # set up $ as the symbol if no locale is set
        if self.symbol == "":
            self.symbol = '$'
예제 #3
0
 def __init__(self, **config):
     GenPollUrl.__init__(self, **config)
     self.add_defaults(StockTicker.defaults)
     self.sign = locale.localeconv()["currency_symbol"]
     self.query = {
         "interval": self.interval,
         "outputsize": "compact",
         "function": self.function,
     }
     for k, v in config.items():
         self.query[k] = v
예제 #4
0
파일: open_weather.py 프로젝트: m-col/qtile
 def __init__(self, **config):
     GenPollUrl.__init__(self, **config)
     self.add_defaults(OpenWeather.defaults)
     self.symbols.update(self.weather_symbols)
예제 #5
0
 def __init__(self, **config):
     GenPollUrl.__init__(self, **config)
     self.add_defaults(OpenWeather.defaults)
예제 #6
0
파일: idlerpg.py 프로젝트: zero77/qtile
 def __init__(self, **config):
     GenPollUrl.__init__(self, **config)
     self.add_defaults(IdleRPG.defaults)
예제 #7
0
 def __init__(self, **config):
     GenPollUrl.__init__(self, **config)
     self.add_defaults(YahooWeather.defaults)
     self.headers.update(HEADER)
예제 #8
0
 def __init__(self, **config):
     GenPollUrl.__init__(self, **config)
     self.add_defaults(YahooWeather.defaults)
     self._url = None