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())))
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())) )
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']) ) )