From ef85245f159402fd948ff045b56ad9095d22b39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 3 Feb 2015 20:57:20 +0100 Subject: Implementing main loop These new scripts are part of main loop. kernel is not finished!! Divides kconfig_parser, sat_solution to better named modules. Phasing and iteration is implemented for loop watching. --- scripts/iteration.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/iteration.py (limited to 'scripts/iteration.py') 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)) -- cgit v1.2.3