This commit is contained in:
Costa Shulyupin 2022-11-04 06:36:44 +02:00
parent ecd483e222
commit acc8223d41
1 changed files with 22 additions and 20 deletions

View File

@ -68,6 +68,7 @@ def print_limited(a, out=None):
# raise(Exception('Reached lines limit'))
out.write(str(a) + '\n')
def print_limited2(a, out=None):
# exits when reaches limit of printed lines
out = out if out else sys.stdout
@ -78,6 +79,7 @@ def print_limited2(a, out=None):
level_limit = 2
out.write(str(a) + '\n')
def log(*args, **kwargs):
# log with context function
if not verbose:
@ -954,7 +956,7 @@ def to_dg(a):
if os.path.isfile(a):
log(a)
return read_dot(a)
raise(Exception(a))
raise (Exception(a))
def remove_loops(dg):