From eb9b86707f8712d586f962c049d401391ba47823 Mon Sep 17 00:00:00 2001 From: emilekm2142 Date: Thu, 30 May 2019 20:11:35 +0200 Subject: [PATCH] kolejny minor --- program.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/program.py b/program.py index a9308c2..70f82e1 100644 --- a/program.py +++ b/program.py @@ -57,15 +57,15 @@ class RegexInterpreter(AbstractInterpreter): make_reg = lambda formula,pattern: 'echo "{0}" | grep -P "{1}"'.format(formula,pattern) def check_assertion(formula, pattern): cmd = make_reg(formula,pattern) - print("EXECUTING... ",cmd) + #print("EXECUTING... ",cmd) result = subprocess.run([cmd], shell=True, stdout=subprocess.PIPE) - return len(result.stdout)>0 + return not len(result.stdout)>0 cmd =make_reg(formula,'^(\((?:[^()]++|(?1))*\))$') - print("EXECUTING... ",cmd) + #print("EXECUTING... ",cmd) result = subprocess.run([cmd], shell=True, stdout=subprocess.PIPE) - return None + isValid = len(result.stdout)>0 if not isValid: return False @@ -182,7 +182,7 @@ if len(sys.argv) > 1 : i = ProperInterpreter() if '-g' in sys.argv: i = RegexInterpreter() - print(sys.argv) + #print(sys.argv) if '-f' in sys.argv: #open from file