remove some hard-coded paths
This commit is contained in:
parent
ffc49b7c2a
commit
0b09eeede5
1 changed files with 4 additions and 4 deletions
|
|
@ -15,13 +15,13 @@ def disable_sigint():
|
||||||
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||||
|
|
||||||
class NimrodThread(threading.Thread):
|
class NimrodThread(threading.Thread):
|
||||||
def __init__(self):
|
def __init__(self, project_path):
|
||||||
super(NimrodThread, self).__init__()
|
super(NimrodThread, self).__init__()
|
||||||
self.tasks = Queue.Queue()
|
self.tasks = Queue.Queue()
|
||||||
self.responses = Queue.Queue()
|
self.responses = Queue.Queue()
|
||||||
self.nim = subprocess.Popen(
|
self.nim = subprocess.Popen(
|
||||||
["nimrod", "serve", "--server.type:stdin", "nimrod.nim"],
|
["nimrod", "serve", "--server.type:stdin", project_path],
|
||||||
cwd = "/Users/zahary/Projects/nim/compiler",
|
cwd = os.path.dirname(project_path),
|
||||||
stdin = subprocess.PIPE,
|
stdin = subprocess.PIPE,
|
||||||
stdout = subprocess.PIPE,
|
stdout = subprocess.PIPE,
|
||||||
stderr = subprocess.STDOUT,
|
stderr = subprocess.STDOUT,
|
||||||
|
|
@ -73,7 +73,7 @@ def execNimCmd(project, cmd, async = True):
|
||||||
if projects.has_key(project):
|
if projects.has_key(project):
|
||||||
target = projects[project]
|
target = projects[project]
|
||||||
else:
|
else:
|
||||||
target = NimrodVimThread()
|
target = NimrodVimThread(project)
|
||||||
projects[project] = target
|
projects[project] = target
|
||||||
target.start()
|
target.start()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue