[Pythonmac-SIG] spotlight and Python files

Dave Reed dreed at capital.edu
Tue May 10 17:22:56 CEST 2005


I noticed Spotlight doesn't index Python files. I'm not certain how  
useful it would be but I was thinking about trying to get spotlight  
to index the name of classes and functions/methods (i.e., you could  
enter a class name and spotlight would find the Python file  
containing the class). I don't care if it does it on the fly as files  
are updated, but thought it would be nice to be able to run a Python  
script that would index all Python files in a directory. You could  
use the inspect module to grab the class/function/method names and  
tell spotlight to include them. I know there are some command line  
tools to interact with spotlight, but after a quick look at them,  
nothing jumped out at me for doing this.

Is anyone interested in this (i.e., would you find it useful) and if  
so, does anyone understand Spotlight well enough to point me in the  
right direction (pointers to specific documentation are welcome).

Thanks,
Dave



More information about the Pythonmac-SIG mailing list