Show More
@@ -21,6 +21,7 b' README_Windows.txt' | |||||
21 | """ |
|
21 | """ | |
22 |
|
22 | |||
23 | from subprocess import Popen,PIPE |
|
23 | from subprocess import Popen,PIPE | |
|
24 | import os | |||
24 |
|
25 | |||
25 | from IPython import genutils |
|
26 | from IPython import genutils | |
26 |
|
27 | |||
@@ -30,10 +31,14 b' class IpyPopen(Popen):' | |||||
30 | def go(self): |
|
31 | def go(self): | |
31 | print self.communicate()[0] |
|
32 | print self.communicate()[0] | |
32 | def __repr__(self): |
|
33 | def __repr__(self): | |
33 | return '<IPython job "%s">' % self.line |
|
34 | return '<IPython job "%s" PID=%d>' % (self.line, self.pid) | |
34 |
|
35 | |||
|
36 | def kill(self): | |||
|
37 | assert os.name == 'nt' # xxx add posix version | |||
|
38 | os.system('taskkill /PID %d' % self.pid) | |||
|
39 | ||||
35 | def startjob(job): |
|
40 | def startjob(job): | |
36 | p = IpyPopen(job, stdout=PIPE) |
|
41 | p = IpyPopen(job, stdout=PIPE, shell = False) | |
37 | p.line = job |
|
42 | p.line = job | |
38 | return p |
|
43 | return p | |
39 |
|
44 |
General Comments 0
You need to be logged in to leave comments.
Login now