From 2ce3c0869754554fcbdfbb87447f0179937a9764 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 16 Feb 2016 12:52:11 +0100 Subject: [PATCH] gui/applets: escape backslashes in {python} and {ipc_address} --- artiq/gui/applets.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/artiq/gui/applets.py b/artiq/gui/applets.py index 43c2a9aff..d757c16e1 100644 --- a/artiq/gui/applets.py +++ b/artiq/gui/applets.py @@ -110,8 +110,10 @@ class AppletDock(QDockWidgetCloseDetect): if "{ipc_address}" not in self.command: logger.warning("IPC address missing from command for %s", self.applet_name) - command = self.command.format(python=sys.executable, - ipc_address=self.ipc.get_address()) + command = self.command.format( + python=sys.executable.replace("\\", "\\\\"), + ipc_address=self.ipc.get_address().replace("\\", "\\\\") + ) logger.debug("starting command %s for %s", command, self.applet_name) try: await self.ipc.create_subprocess(*shlex.split(command))