##// END OF EJS Templates
Add --proc option to %%script...
Takafumi Arakaki -
Show More
@@ -58,6 +58,12 b' def script_args(f):'
58 with --out/err.
58 with --out/err.
59 """
59 """
60 ),
60 ),
61 magic_arguments.argument(
62 '--proc', type=str,
63 help="""The variable in which to store Popen instance.
64 This is used only when --bg option is given.
65 """
66 ),
61 ]
67 ]
62 for arg in args:
68 for arg in args:
63 f = arg(f)
69 f = arg(f)
@@ -193,6 +199,8 b' class ScriptMagics(Magics, Configurable):'
193 if args.err:
199 if args.err:
194 self.shell.user_ns[args.err] = p.stderr
200 self.shell.user_ns[args.err] = p.stderr
195 self.job_manager.new(self._run_script, p, cell)
201 self.job_manager.new(self._run_script, p, cell)
202 if args.proc:
203 self.shell.user_ns[args.proc] = p
196 return
204 return
197
205
198 out, err = p.communicate(cell)
206 out, err = p.communicate(cell)
General Comments 0
You need to be logged in to leave comments. Login now