remove some hard-coded paths

This commit is contained in:
Zahary Karadjov 2013-05-01 22:26:48 +03:00
commit 0b09eeede5

View file

@ -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()