Skip to content

Commit d08421a

Browse files
committed
Python3 support
Signed-off-by: Justin Lecher <[email protected]>
1 parent d53096e commit d08421a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: hbplus.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
License: BSD-2-Clause
77
'''
88

9+
from __future__ import print_function
10+
911
from pymol import cmd, CmdException
1012

1113

@@ -34,7 +36,7 @@ def hbplus(selection='all', exe='hbplus', prefix='hb_', state=-1, quiet=1):
3436
stdout, _ = process.communicate()
3537

3638
if not quiet:
37-
print stdout
39+
print(stdout)
3840

3941
for line in open(hb2file):
4042
if line[5] != '-' or line[19] != '-':
@@ -47,7 +49,7 @@ def hbplus(selection='all', exe='hbplus', prefix='hb_', state=-1, quiet=1):
4749
cmd.distance(prefix + cat, sele1, sele2)
4850

4951
except OSError:
50-
print 'Error: Cannot execute exe=' + exe
52+
print('Error: Cannot execute exe=' + exe)
5153
raise CmdException
5254
finally:
5355
shutil.rmtree(tempdir)

0 commit comments

Comments
 (0)