diff --git a/utils/template.py b/utils/template.py index 58cba75..0e1c684 100755 --- a/utils/template.py +++ b/utils/template.py @@ -2,10 +2,12 @@ """ Jour DAY du défi Advent Of Code pour l'année YEAR """ +import os def read_sample(): """récupère les entrées depuis le fichier texte correspondant""" - with open('inputs/dayDAY.txt', 'r') as f: + filename = os.path.join(os.path.dirname(__file__ ), "inputs", "dayDAY.txt") + with open(filename, 'r') as f: sample = f.read().split('\n') sample = [ i for i in sample if i != '' ] return sample