bundles / IPython 9.10.0 / IPython / utils / frame / extract_vars
function
IPython.utils.frame:extract_vars
source: /IPython/utils/frame.py :24
Signature
def extract_vars ( * names , ** kw ) Summary
Extract a set of variables by name from another frame.
Parameters
*names: strOne or more variable names which will be extracted from the caller's frame.
**kw: integer, optionalHow many frames in the stack to walk when looking for your variables. The default is 0, which will use the frame where the call was made.
Examples
:: In [2]: def func(x): ...: y = 1 ...: print(sorted(extract_vars('x','y').items())) ...: In [3]: func('hello') [('x', 'hello'), ('y', 1)]Aliases
-
IPython.utils.frame.extract_vars