Commit 4cf9ef70 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

Fixed modified example code execution

parent b9cbf387
......@@ -154,7 +154,8 @@ class ExampleLoader(QtGui.QMainWindow):
#os.spawnl(os.P_NOWAIT, sys.executable, sys.executable, fn, *extra)
if edited:
proc = subprocess.Popen([sys.executable, '-'] + extra, stdin=subprocess.PIPE)
path = os.path.abspath(os.path.dirname(__file__))
proc = subprocess.Popen([sys.executable, '-'] + extra, stdin=subprocess.PIPE, cwd=path)
code = str(self.ui.codeView.toPlainText()).encode('UTF-8')
proc.stdin.write(code)
proc.stdin.close()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment