Exemplo n.º 1
0
def main():
    session = utils.session
    all_records = session.query(utils.Game).all()

    # New client to write to led sign
    pwd = os.path.dirname(os.path.realpath(__file__))
    led_sign_path = '/'.join([pwd, 'led_sign']) 
    glyphs_path = '/'.join([led_sign_path, 'glyphs'])

    sign_client = SignClient(glyphs_path, led_sign_path)

    for game in all_records:
        lines = get_game_text(game)
        sign_client.send_text_to_sign(lines)
        time.sleep(6)
Exemplo n.º 2
0
def main():
    session = utils.session
    all_records = session.query(utils.Game).all()

    # New client to write to led sign
    pwd = os.path.dirname(os.path.realpath(__file__))
    led_sign_path = '/'.join([pwd, 'led_sign'])
    glyphs_path = '/'.join([led_sign_path, 'glyphs'])

    sign_client = SignClient(glyphs_path, led_sign_path)

    for game in all_records:
        lines = get_game_text(game)
        sign_client.send_text_to_sign(lines)
        time.sleep(6)
Exemplo n.º 3
0
def start_msg():
    from led_sign.client import SignClient; print

    pwd = os.path.dirname(os.path.realpath(__file__))
    led_sign_path = '/'.join([pwd, 'led_sign']) 
    glyphs_path = '/'.join([led_sign_path, 'glyphs'])

    start = ['Starting', 'Sports Ticker']
    SignClient(glyphs_path, led_sign_path).send_text_to_sign(start);
Exemplo n.º 4
0
def main():
  # New client to write to led sign
  pwd = os.path.dirname(os.path.realpath(__file__))
  led_sign_path = '/'.join([pwd, 'led_sign']) 
  glyphs_path = '/'.join([led_sign_path, 'glyphs'])

  sign_client = SignClient(glyphs_path, led_sign_path)

  while True:
    try:
      estimates = get_bart_estimates('ROCK', 's')
      sign_client.send_text_to_sign(estimates)
      time.sleep(30)
    except:
      sign_client.send_text_to_sign(['ERROR',''])
      print(sys.exc_info()[0])
      raise
      time.sleep(3)