def push(self, variables, interactive=True):
vdict = None<EOL>if isinstance(variables, dict):<EOL><INDENT>vdict = variables<EOL><DEDENT>elif isinstance(variables, (str, list, tuple)):<EOL><INDENT>if isinstance(variables, str):<EOL><INDENT>vlist = variables.split()<EOL><DEDENT>else:<EOL><INDENT>vlist = variables<EOL><DEDENT>vdict = {}<EOL>cf = sys._getframe(<NUM_LIT:1>)<EOL>for name in vlist:<EOL><INDENT>try:<EOL><INDENT>vdict[name] = eval(name, cf.f_globals, cf.f_locals)<EOL><DEDENT>except:<EOL><INDENT>print(('<STR_LIT>' %<EOL>(name,cf.f_code.co_name)))<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>self.user_ns.update(vdict)<EOL>user_ns_hidden = self.user_ns_hidden<EOL>if interactive:<EOL><INDENT>user_ns_hidden.difference_update(vdict)<EOL><DEDENT>else:<EOL><INDENT>user_ns_hidden.update(vdict)<EOL><DEDENT>
Inject a group of variables into the IPython user namespace.

        Parameters
        ----------
        variables : dict, str or list/tuple of str
            The variables to inject into the user's namespace.  If a dict, a
            simple update is done.  If a str, the string is assumed to have
            variable names separated by spaces.  A list/tuple of str can also
            be used to give the variable names.  If just the variable names are
            give (list/tuple/str) then the variable values looked up in the
            callers frame.
        interactive : bool
            If True (default), the variables will be listed with the ``who``
            magic.