[Pythonmac-SIG] Spotlight and Python

Jonathan Wight jwight_lists at toxicsoftware.com
Wed May 11 02:52:47 CEST 2005


I've made a first pass at it and have a Spotlight importer that calls  
a built-in Python function to import a file's metadata.

I started to look at module inspect to find out how to extract  
information from a Python module but then realised that I'd need to  
import the file the importer is analysing. This would mean it will be  
executing arbitrary code inside that file. That's got to be a bad  
thing for security reasons.

So instead I'm just going to have to use string processing to scan  
the file instead. Are there any modules out there for extracting  
information from Python script files?

     Jon.

On May 10, 2005, at 16:58, Jonathan Wight wrote:






> I'll have a play with it later today. I don't think it should be too
> difficult at all.
>
>      Jon.
>
> On May 10, 2005, at 16:22, David Reed wrote:
>
>
>
>
>
>
>
>
>> I don't think I'd want all variables/symbols to be indexed, but I
>> think function and class names might be nice and adding the
>> documentation strings might be worthwhile too. It appears I still
>> need to learn more about Objective-C although one of Jonathan's
>> emails makes me think I could just read the file and make a space
>> separated string of the functions and class names and that would
>> about take care of it.
>>
>> If someone who knows more about Objective-C wants to take a stab at
>> this feel free as I probably won't get to learning more about
>> Objective-C for a couple more months.
>>
>>
>>
>>







More information about the Pythonmac-SIG mailing list