[Ipython-tickets] [IPython] #245: %lookfor magic function to search functions by docstring recursively
IPython
ipython-tickets@scipy....
Thu Apr 10 17:30:05 CDT 2008
#245: %lookfor magic function to search functions by docstring recursively
-------------------------+--------------------------------------------------
Reporter: pv | Owner: fperez
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: ipython | Version:
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
It'd be nice to have a %lookfor function in ipython, à la Matlab:
{{{
In [1]: import ipy_lookfor
In [2]: %lookfor_modules
Modules included in %lookfor search: ['numpy', 'scipy']
In [3]: %lookfor load matlab
Search results for 'load matlab'
--------------------------------
scipy.io.loadmat
Load Matlab(tm) file
scipy.io.matlab.mio.mat_reader_factory
Create reader for matlab (TM) .mat format files
scipy.io.matlab.mio4.MatFileReader
Base object for reading mat files
}}}
The attached implementation would probably need some additional work:
- It might make sense to have %lookfor available built-in, not as an
extension
- Review the result sorting heuristics
- Do we want to search for only stuff in __all__?
- Do we want to import the modules in %lookfor_modules if they haven't
yet been imported?
- Add only one magic function %lookfor, and implement any options as
switches for it?
--
Ticket URL: <http://ipython.scipy.org/ipython/ipython/ticket/245>
IPython <http://ipython.scipy.org>
The IPython interactive Python system
More information about the Ipython-tickets
mailing list