Search for object in namespaces by wildcard. %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 unchan
(self, parameter_s='')
| 123 | |
| 124 | @line_magic |
| 125 | def psearch(self, parameter_s=''): |
| 126 | """Search for object in namespaces by wildcard. |
| 127 | |
| 128 | %psearch [options] PATTERN [OBJECT TYPE] |
| 129 | |
| 130 | Note: ? can be used as a synonym for %psearch, at the beginning or at |
| 131 | the end: both a*? and ?a* are equivalent to '%psearch a*'. Still, the |
| 132 | rest of the command line must be unchanged (options come first), so |
| 133 | for example the following forms are equivalent |
| 134 | |
| 135 | %psearch -i a* function |
| 136 | -i a* function? |
| 137 | ?-i a* function |
| 138 | |
| 139 | Arguments: |
| 140 | |
| 141 | PATTERN |
| 142 | |
| 143 | where PATTERN is a string containing * as a wildcard similar to its |
| 144 | use in a shell. The pattern is matched in all namespaces on the |
| 145 | search path. By default objects starting with a single _ are not |
| 146 | matched, many IPython generated objects have a single |
| 147 | underscore. The default is case insensitive matching. Matching is |
| 148 | also done on the attributes of objects and not only on the objects |
| 149 | in a module. |
| 150 | |
| 151 | [OBJECT TYPE] |
| 152 | |
| 153 | Is the name of a python type from the types module. The name is |
| 154 | given in lowercase without the ending type, ex. StringType is |
| 155 | written string. By adding a type here only objects matching the |
| 156 | given type are matched. Using all here makes the pattern match all |
| 157 | types (this is the default). |
| 158 | |
| 159 | Options: |
| 160 | |
| 161 | -a: makes the pattern match even objects whose names start with a |
| 162 | single underscore. These names are normally omitted from the |
| 163 | search. |
| 164 | |
| 165 | -i/-c: make the pattern case insensitive/sensitive. If neither of |
| 166 | these options are given, the default is read from your configuration |
| 167 | file, with the option ``InteractiveShell.wildcards_case_sensitive``. |
| 168 | If this option is not specified in your configuration file, IPython's |
| 169 | internal default is to do a case sensitive search. |
| 170 | |
| 171 | -e/-s NAMESPACE: exclude/search a given namespace. The pattern you |
| 172 | specify can be searched in any of the following namespaces: |
| 173 | 'builtin', 'user', 'user_global','internal', 'alias', where |
| 174 | 'builtin' and 'user' are the search defaults. Note that you should |
| 175 | not use quotes when specifying namespaces. |
| 176 | |
| 177 | -l: List all available object types for object matching. This function |
| 178 | can be used without arguments. |
| 179 | |
| 180 | 'Builtin' contains the python module builtin, 'user' contains all |
| 181 | user data, 'alias' only contain the shell aliases and no python |
| 182 | objects, 'internal' contains objects used by IPython. The |
no test coverage detected