Skip to content

Commit 02e32dc

Browse files
committed
RF: DICOMConvert - use the same (basename of) python as of the host process
May be basename is not desired? but it might not exist exactly the same on execution box, so decided to go with basename
1 parent e671d61 commit 02e32dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import os.path as op
88
from glob import glob
99
import shutil
10+
import sys
1011

1112
import numpy as np
1213
from nibabel import load
@@ -726,7 +727,7 @@ def cmdline(self):
726727
outdir = self._get_outdir()
727728
cmd = []
728729
if not os.path.exists(outdir):
729-
cmdstr = "python -c \"import os; os.makedirs('%s')\"" % outdir
730+
cmdstr = "%s -c \"import os; os.makedirs('%s')\"" % (op.basename(sys.executable), outdir)
730731
cmd.extend([cmdstr])
731732
infofile = os.path.join(outdir, "shortinfo.txt")
732733
if not os.path.exists(infofile):

0 commit comments

Comments
 (0)