From 201d3c344157f2dd21d42ec6a95d3659b7d99a64 Mon Sep 17 00:00:00 2001 From: Ricky Charlet Date: Sat, 2 Jun 2018 15:16:00 -0700 Subject: [PATCH] fix path to codeView.bat The path to codeview.bat had previously escaped the space between the command and the argument in a non-portable way. Problem showed up on MacOS. Making use of a list for [command, arg1, arg2] fixes up the problem in a portable way. --- CodeAtlas.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CodeAtlas.py b/CodeAtlas.py index eadc665..90b545e 100644 --- a/CodeAtlas.py +++ b/CodeAtlas.py @@ -18,10 +18,12 @@ def run(self): socketThread = DataManager.instance().getSocket(self.window.id()) # command line window - subprocess.Popen('%s\\codeView.bat %s' % (curPath, socketThread.remoteAddress[1]), cwd = curPath, stdout = None) + cmd = ["{}/codeView.bat".format(curPath), str(socketThread.remoteAddress[1])] + print('cmd: ', cmd) + subprocess.Popen(cmd, shell=True, cwd = curPath, stdout = None) # no command line window - curPath = curPath + '\\CodeViewPy' + curPath = curPath + '/CodeViewPy' cmdStr = 'main %s' % (socketThread.remoteAddress[1], ) # subprocess.Popen(cmdStr, cwd = curPath, shell = True )