Exemplo n.º 1
0
def append_result(gen_number, red_score, ian_watched, players, handicaps):
    with open('results_log.txt', 'a') as results_log:
        results_log.write("{},{},{},{},{},{}\n".format(gen_number, red_score,
                                                       players, handicaps,
                                                       time(), ian_watched))
    with open('share_prices.txt', 'a') as share_price_log:
        share_price_log.write("{},{}\n".format(
            gen_number, yesterdays_price_from_timestamp(time())))
Exemplo n.º 2
0
def append_result(gen_number, red_score, ian_watched, players, handicaps):
    with open('results_log.txt', 'a') as results_log:
        results_log.write(
            "{},{},{},{},{},{}\n"
            .format(gen_number, red_score, players, handicaps, time(), ian_watched)
        )
    with open('share_prices.txt', 'a') as share_price_log:
        share_price_log.write(
            "{},{}\n"
            .format(gen_number, yesterdays_price_from_timestamp(time()))
        )
Exemplo n.º 3
0
from mario_kart_files import get_generations_with_results
from share_price import yesterdays_price_from_timestamp

all_games = get_generations_with_results(reverse_order=False)

with open('share_prices.txt', 'a') as share_price_file:
    for game in all_games:
        if 'submit time' in game:
            share_price_file.write('{}, {}\n'.format(
                game['generation number'],
                yesterdays_price_from_timestamp(game['submit time'])))
from mario_kart_files import get_generations_with_results
from share_price import yesterdays_price_from_timestamp

all_games = get_generations_with_results(reverse_order=False)

with open('share_prices.txt', 'a') as share_price_file:
    for game in all_games:
        if 'submit time' in game:
            share_price_file.write(
                '{}, {}\n'.format(
                    game['generation number'], 
                    yesterdays_price_from_timestamp(game['submit time'])
                )
            )