diff options
author | Juergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com> | 2017-02-03 10:44:00 +0100 |
---|---|---|
committer | Juergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com> | 2017-02-03 10:44:00 +0100 |
commit | 6dd57dc8ebf1db3f143350c46890a2a8bff3308c (patch) | |
tree | 82852d8f538e283371849fc8420bc4224bbb4fb5 | |
parent | aa37a6e1e65cd6eeada2d00e0a0210e44fea42e6 (diff) | |
download | qtivi-qface-6dd57dc8ebf1db3f143350c46890a2a8bff3308c.tar.gz |
Ensured the script is always called with the correct python executable in reload mode
-rw-r--r-- | qface/watch.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |