aboutsummaryrefslogtreecommitdiff
path: root/scripts/iteration.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/iteration.py')
-rw-r--r--scripts/iteration.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/iteration.py b/scripts/iteration.py
new file mode 100644
index 0000000..f885b37
--- /dev/null
+++ b/scripts/iteration.py
@@ -0,0 +1,12 @@
+from conf import conf
+
+def reset():
+ with open(conf.iteration_file, 'w') as f:
+ f.write('0')
+
+def inc():
+ with open(conf.iteration_file, 'r') as f:
+ it = int(f.read())
+ it += 1
+ with open(conf.iteration_file, 'w') as f:
+ f.write(str(it))