Skip to content

Commit

Permalink
Merge pull request #1237 from MRtrix3/run_command_native_windows_support
Browse files Browse the repository at this point in the history
run.command(): Support native Windows Python
  • Loading branch information
jdtournier authored Apr 24, 2018
2 parents e25f7c6 + 88221c8 commit e27b120
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/mrtrix3/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ def command(cmd, exitOnError=True):
global _processes

# Vectorise the command string, preserving anything encased within quotation marks
cmdsplit = shlex.split(cmd)
if os.sep is '/': # Cheap POSIX compliance check
cmdsplit = shlex.split(cmd)
else: # Native Windows Python
cmdsplit = [ entry.strip('\"') for entry in shlex.split(cmd, posix=False) ]

if app._lastFile:
# Check to see if the last file produced in the previous script execution is
Expand Down

0 comments on commit e27b120

Please sign in to comment.