[IPython-dev] Mathematica wildcards in ?

Jörgen Stenarson jorgen.stenarson at bostream.nu
Fri Sep 9 15:47:42 CDT 2005


Hi all,

I'm a happy user of IPython but I often wish I had a feature found in 
Mathematica. Where the ? command can take wildcards and then produce a 
list of all names matching the wildcard. There is also support for 
matching down in packages.

example when using pylab:
?pl*
['plot', 'plot_date', 'plotting']

?matplotlib.a*
['matplotlib.afm',
  'matplotlib.agg',
  'matplotlib.artist',
  'matplotlib.axes',
  'matplotlib.axis']

It would also be nice to be able to filer on types of objects like:

?matplotlib.* class
['matplotlib.MPLError',
  'matplotlib.ValidateInStrings',
  'matplotlib.ValidateInterval',
  'matplotlib.Verbose',
  'matplotlib.validate_nseq_float']

I have appended a first shot at an implementation of this feature. It 
should work by starting ipython and then importing wildcard.

The functionality is installed as a magic function named %listdef. This 
seemed like the easiest way to test it.

Is this something more people would find useful added to the ? function?

Best regards,
Jörgen Stenarson






-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wildcard.py
Url: http://projects.scipy.org/pipermail/ipython-dev/attachments/20050909/1ec11a46/attachment.pl 


More information about the IPython-dev mailing list