Show More
@@ -254,7 +254,12 b' class ScriptMagics(Magics, Configurable):' | |||
|
254 | 254 | p.wait() |
|
255 | 255 | |
|
256 | 256 | @line_magic("killbgscripts") |
|
257 |
def kill |
|
|
257 | def killbgscripts(self, _nouse_=''): | |
|
258 | """Kill all BG processes started by %%script and its family.""" | |
|
259 | self.kill_bg_processes() | |
|
260 | print "All background processes were killed." | |
|
261 | ||
|
262 | def kill_bg_processes(self): | |
|
258 | 263 | """Kill all BG processes which are still running.""" |
|
259 | 264 | for p in self.bg_processes: |
|
260 | 265 | if p.poll() is None: |
General Comments 0
You need to be logged in to leave comments.
Login now