aboutsummaryrefslogtreecommitdiff
path: root/scripts/iteration.py
blob: ef5a3f0aee1827474945de707167f5f76c87c23b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from conf import conf
from conf import sf

def reset():
	with open(sf(conf.iteration_file), 'w') as f:
		f.write('0')

def inc():
	with open(sf(conf.iteration_file), 'r') as f:
		it = int(f.read())
	it += 1
	with open(sf(conf.iteration_file), 'w') as f:
		f.write(str(it))