Add verbose option in PyLammps methods
This option allows forcing LAMMPS output to be printed to the console.
This commit is contained in:
@ -640,6 +640,10 @@ class PyLammps(object):
|
|||||||
with OutputCapture() as capture:
|
with OutputCapture() as capture:
|
||||||
self.lmp.command(' '.join(cmd_args))
|
self.lmp.command(' '.join(cmd_args))
|
||||||
output = capture.output
|
output = capture.output
|
||||||
|
|
||||||
|
if 'verbose' in kwargs and kwargs['verbose']:
|
||||||
|
print(output)
|
||||||
|
|
||||||
lines = output.splitlines()
|
lines = output.splitlines()
|
||||||
|
|
||||||
if len(lines) > 1:
|
if len(lines) > 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user