Skip to content

Commit

Permalink
Fixed modified example code execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Campagnola committed Feb 25, 2013
1 parent b9cbf38 commit 4cf9ef7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ def loadFile(self, edited=False):
#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()
Expand Down

0 comments on commit 4cf9ef7

Please sign in to comment.