Logo Search packages:      
Sourcecode: ipython version File versions  Download package

def IPython::Magic::Magic::_execute_block (   self,
  block,
  par 
) [private]

Execute a block, or store it in a variable, per the user's request.

Definition at line 3313 of file Magic.py.

03313                                         :
        """ Execute a block, or store it in a variable, per the user's request.
        """
        if not par:
            b = textwrap.dedent(block)
            self.user_ns['pasted_block'] = b
            exec b in self.user_ns
        else:
            self.user_ns[par] = SList(block.splitlines())
            print "Block assigned to '%s'" % par

    def magic_cpaste(self, parameter_s=''):


Generated by  Doxygen 1.6.0   Back to index