I am injecting variables and functions into my default ipython namespace by dropping some *.py
files into ~/.ipython/profile_default/startup
.
I can list names that are newly created in an ipython session by typing %who
or %who_ls
. However the names defined in my startup files do not show up. Is there a magic function or a way to list all names introduced in the startup directory into an active ipython interactive session ?
You can use pattern searching via %psearch
. To list all objects NOT in the builtin space, use:
%psearch -e builtin *
%psearch [options] PATTERN [OBJECT TYPE]
Note: ? can be used as a synonym for %psearch, at the beginning or at the end: both a*? and ?a* are equivalent to '%psearch a*'. Still, the rest of the command line must be unchanged (options come first), so for example the following forms are equivalent
%psearch -ia* function -ia* function? ?-ia* function
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.