Skip to content

Commit f431e0c

Browse files
committed
Converting files to python2/3 compatibility
1 parent 013bf72 commit f431e0c

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

nipype/interfaces/niftyseg/label_fusion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
that can be performed with the seg_LabFusion command-line program.
77
"""
88

9+
from builtins import str
910
import os
1011
import warnings
1112

nipype/interfaces/niftyseg/maths.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ class Merge(MathsCommand):
414414

415415
def _format_arg(self, opt, spec, val):
416416
"""Convert input to appropriate format for seg_maths."""
417-
print opt
418417
if opt == 'merge_files':
419418
return "-merge %d %d %s" % (len(val), self.inputs.dimension,
420419
' '.join(val))

nipype/interfaces/niftyseg/stats.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
The stats module provides higher-level interfaces to some of the operations
55
that can be performed with the niftysegstats (seg_stats) command-line program.
66
"""
7+
from __future__ import print_function
78
import numpy as np
89

910
from ..base import TraitedSpec, File, traits, CommandLineInputSpec
@@ -48,7 +49,7 @@ class StatsCommand(NiftySegCommand):
4849
def _parse_stdout(self, stdout):
4950
out = []
5051
for string_line in stdout.split("\n"):
51-
print('parsing line ' + string_line)
52+
print('parsing line {0}'.format(string_line))
5253
if string_line.startswith('#'):
5354
continue
5455
if len(string_line) <= 1:

nipype/interfaces/niftyseg/tests/test_Seg_Maths.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,4 @@ def test_merge():
156156
f2=file2,
157157
out_file=os.path.join(os.getcwd(), 'im1_merged.nii'))
158158

159-
print merge.cmdline
160-
print '\n'
161-
print expected_cmd
162159
assert merge.cmdline == expected_cmd

0 commit comments

Comments
 (0)