From 45f1b89baab59336c4a7511ca36e960f7c340f3e Mon Sep 17 00:00:00 2001 From: Marco Gario Date: Wed, 17 Aug 2016 16:27:26 +0200 Subject: [PATCH] SMT-LIB Wrapper: Line buffering in Popen --- pysmt/smtlib/solver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pysmt/smtlib/solver.py b/pysmt/smtlib/solver.py index 4b720b8f9..313aa4dff 100644 --- a/pysmt/smtlib/solver.py +++ b/pysmt/smtlib/solver.py @@ -44,7 +44,8 @@ def __init__(self, args, environment, logic, LOGICS=None, **options): if LOGICS is not None: self.LOGICS = LOGICS self.args = args self.declared_vars = set() - self.solver = Popen(args, stdout=PIPE, stderr=PIPE, stdin=PIPE) + self.solver = Popen(args, stdout=PIPE, stderr=PIPE, stdin=PIPE, + bufsize=-1) # Give time to the process to start-up time.sleep(0.01) self.parser = SmtLibParser(interactive=True)