Example #1
0
def main():
    interval_days = readintervaldays()
    datahandler.load(interval_days)

    #for stockName in datahandler.stock_list:

    stockName = raw_input()
    run(stockName, interval_days)
Example #2
0
def main():
  interval_days = readintervaldays()
  datahandler.load(interval_days)
  
  stockName = raw_input('Stock: ')
  year = input('Year: ')
  print ''
  run(stockName, interval_days, year)
Example #3
0
def main():
  interval_days = readintervaldays()
  datahandler.load(interval_days)
  
  #for stockName in datahandler.stock_list:
  
  stockName = raw_input()
  run(stockName, interval_days)
def main():
    interval_days = readintervaldays()
    datahandler.load(interval_days)

    stockName = raw_input('Stock: ')
    year = input('Year: ')
    print ''
    run(stockName, interval_days, year)
Example #5
0
 def gatherItems(self):
     if (datahandler.tryLoad(self.CHARNAME, self.WORLD)):
         self.DATA = datahandler.load(self.CHARNAME, self.WORLD)
     else:
         self.apiConnection.request(
             "GET",
             self.CHAR_API_SERVICE + self.WORLD + "/" + self.CHARNAME +
             "?fields=items&locale=en_GB&apikey=" + self.API_KEY, '', {})
         req = self.apiConnection.getresponse()
         data = req.read()
         self.DATA = json.loads(data)
         self.DATA["last_load"] = time.strftime("%a, %d %b %Y %H:%M:%S",
                                                time.gmtime())
         self.DATA["proper_date"] = time.time()
         datahandler.dump(self.CHARNAME, self.WORLD, self.DATA)