From a08cf7a4b6a0dc123ceb4b81570827d97a968b4f Mon Sep 17 00:00:00 2001 From: Richard Berger <richard.berger@temple.edu> Date: Wed, 10 Aug 2016 14:29:07 -0400 Subject: [PATCH] Add verbose option in PyLammps methods This option allows forcing LAMMPS output to be printed to the console. --- python/lammps.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/lammps.py b/python/lammps.py index c2e9fa983b..6eba1b73c0 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -640,6 +640,10 @@ class PyLammps(object): with OutputCapture() as capture: self.lmp.command(' '.join(cmd_args)) output = capture.output + + if 'verbose' in kwargs and kwargs['verbose']: + print(output) + lines = output.splitlines() if len(lines) > 1: -- GitLab