tools not loaded for Gromacs 2016/2018 in Python 3 on macOS
orbeckst opened this issue · comments
Oliver Beckstein commented
When using Gromacs 2016/2018 (the gmx
command) and Python 3 (and apparently only on macOS) then the tools are not correctly loaded; only tools.Gmx
appears.
Reason: byte string snafu
out = subprocess.check_output([driver, '-quiet', 'help',
'commands'])
for line in str(out).encode('ascii').splitlines()[5:-1]:
The subprocess.check_output()
returns a b
string,
>>> type(out)
bytes
which, when converted with str()
, does not maintain the newlines but rather includes them quoted
and then splitlines()
does not work anymore.
Oliver Beckstein commented
This was introduced in PR #127 but not caught because we are only testing on Linux.