'make a named magic, that calls %%script with a particular program'

def _make_script_magic(self, name):

    script = self.script_paths.get(name, name)
    @magic_arguments.magic_arguments()
    @script_args
    def named_script_magic(line, cell):
        if line:
            line = ('%s    %s' % (script, line))
        else:
            line = script
        return self.shebang(line, cell)
    named_script_magic.__doc__ = '%%{name}    script    magic\n                                \n                                Run    cells    with    {script}    in    a    subprocess.\n                                \n                                This    is    a    shortcut    for    `%%script    {script}`\n                                '.format(**locals())
    return named_script_magic
