From 6dd57dc8ebf1db3f143350c46890a2a8bff3308c Mon Sep 17 00:00:00 2001 From: Juergen Bocklage-Ryannel Date: Fri, 3 Feb 2017 10:44:00 +0100 Subject: Ensured the script is always called with the correct python executable in reload mode --- qface/watch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qface/watch.py') diff --git a/qface/watch.py b/qface/watch.py index 89d07e4..ca3ec73 100644 --- a/qface/watch.py +++ b/qface/watch.py @@ -4,6 +4,7 @@ import click from subprocess import call from path import Path import time +import sys def sh(cmd, all=False, **kwargs): @@ -24,7 +25,8 @@ class RunScriptChangeHandler(FileSystemEventHandler): if self.is_running: return self.is_running = True - sh(self.script, cwd=Path.getcwd()) + cmd = '{0} {1}'.format(sys.executable, self.script) + sh(cmd, cwd=Path.getcwd()) self.is_running = False -- cgit v1.2.3