Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Jonathan Wight
OK. The first version is online at: http://toxicsoftware.com/_private/Python%20Metadata%20Importer.pkg.zip The installer installs the mdimporter to /Library/Spotlight/ and then calls mdimport -r to force Spotlight to reindex all Python files. You _may_ need Xcode installed to have this work su

Re: [Pythonmac-SIG] Newbie.....sorry

2005-05-10 Thread Bob Ippolito
On May 10, 2005, at 11:05 PM, Lee Cullens wrote: > Oh, and forget package manager, > Also see: > http://undefined.org/python/ > http://bob.pythonmac.org/archives/category/python/wxpython/ > and anywhere else Bob has notes - just do your research before > asking a question of him (his bark really

Re: [Pythonmac-SIG] Newbie.....sorry

2005-05-10 Thread Lee Cullens
Oh, and forget package manager,Also see:http://undefined.org/python/http://bob.pythonmac.org/archives/category/python/wxpython/and anywhere else Bob has notes - just do your research before asking a question of him (his bark really is worse than his bite :~)I'm not much more than a "newbie" than yo

[Pythonmac-SIG] spotlight and Python files

2005-05-10 Thread Dave Reed
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 d

Re: [Pythonmac-SIG] Newbie.....sorry

2005-05-10 Thread Lee Cullens
I'm not much more than a "newbie" than you, but start with: http:// pythonmac.org/packages/ I'm on Tiger ("clean" install from Panther) and working with Python 2.4 so my starting point was: MacPython-OSX-2.4.1-1.dmg TigerPython24Fix-r2.zip TigerPython23Compat.pkg If you can sp

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Larry Meyn
How about using pydoc as a starting point? It parses code and generates API documentation in XML or HTML. Larry On May 10, 2005, at 7:25 PM, Jonathan Wight wrote: > I looked at parser but discounted it too soon. After a bit of playing > I managed to get

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Jonathan Wight
I looked at parser but discounted it too soon. After a bit of playing I managed to get the following code to provide lists of class names and function names. Thanks Bob! Jon. #!/usr/bin/python import parser import symbol def find(inTuple, inSymbol): theClasses = [] if inTupl

[Pythonmac-SIG] Newbie.....sorry

2005-05-10 Thread RH
Ok so I decided to take the plunge into Python. I'm a fairly advanced PHP developer and am now moving into Python as a next step. I'm on Panther I just don't comprehend the packages you add into Python. How can you list what packages are installed. I downloaded the python extras and tried th

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Bill Janssen
If you look at the parser module documentation, there's a section labelled "Information Discovery", which details the process. Bill > Are there any modules out there for extracting > information from Python script files? ___ Pythonmac-SIG maillist -

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Bob Ippolito
On May 10, 2005, at 9:55 PM, David Reed wrote: > > On May 10, 2005, at 8:52 PM, Jonathan Wight wrote: > > >> 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 t

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread David Reed
On May 10, 2005, at 8:52 PM, Jonathan Wight wrote: > 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 r

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Bob Ippolito
On May 10, 2005, at 8:52 PM, Jonathan Wight wrote: > 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 reali

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Jonathan Wight
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 ana

[Pythonmac-SIG] [ANN] X-platform GUI made open source for PyGame

2005-05-10 Thread Keith Nemitz
Mousechief announces publication of open source code of a cross-platform, lightweight GUI, for PyGame. Faces and Features is a small, flexible, and elegant set of fundamental building blocks for game user interfaces. Example code is supplied along with the engine sources. A micro app demonstra

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Robert Kern
Jacob Kaplan-Moss wrote: > On May 10, 2005, at 2:00 PM, Jonathan Wight wrote: > > >>I'm not sure how useful it is to index function & class names though. >> > > > Oh, I disagree -- I've got over 100K lines of code, and I would > *kill* to be able to find everywhere a particular symbol is used

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Jonathan Wight
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 strin

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread David Reed
On May 10, 2005, at 3:57 PM, Jacob Kaplan-Moss wrote: > On May 10, 2005, at 2:00 PM, Jonathan Wight wrote: > > >> I'm not sure how useful it is to index function & class names though. >> >> > > Oh, I disagree -- I've got over 100K lines of code, and I would > *kill* to be able to find everywhere

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Bob Ippolito
On May 10, 2005, at 3:57 PM, Jacob Kaplan-Moss wrote: > On May 10, 2005, at 2:00 PM, Jonathan Wight wrote: > > >> I'm not sure how useful it is to index function & class names though. >> >> > > Oh, I disagree -- I've got over 100K lines of code, and I would > *kill* to be able to find everywhere

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Jacob Kaplan-Moss
On May 10, 2005, at 2:00 PM, Jonathan Wight wrote: > I'm not sure how useful it is to index function & class names though. > Oh, I disagree -- I've got over 100K lines of code, and I would *kill* to be able to find everywhere a particular symbol is used. And yes, I know grep -r will do it fo

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Jonathan Wight
On May 10, 2005, at 14:49, David Reed wrote: > I've looked at the example at: > > http://developer.apple.com/documentation/Carbon/Conceptual/ > MDImporters/Concepts/WritingAnImp.html#//apple_ref/doc/uid/ > TP40001275-CJBEJBHH > > I don't yet understand what NSDictionary tempDict contains after i

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread David Reed
On May 10, 2005, at 12:01 PM, Jonathan Wight wrote: > It's certainly a good idea. > > Writing a Spotlight plug-in is extremely straight forward - just > fire up Xcode 2 and create a new "Metadata Importer" project. You > just have one function that you need to provide: > > Boolean GetMetadata

Re: [Pythonmac-SIG] Clean Tiger install and Python 2.4.1

2005-05-10 Thread Lee Cullens
Thanks Bob and Russell, Lee C ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: [Pythonmac-SIG] py2app and CLI Python programs

2005-05-10 Thread David Reed
On May 10, 2005, at 1:28 PM, Bob Ippolito wrote: > On May 10, 2005, at 11:29 AM, Robert Kern wrote: > > >> David Reed wrote: >> >> >>> I've got a command line Python app that I tried packaging up with >>> py2app. It worked ok - t could cd into the subdir of the .app >>> containing the executable

Re: [Pythonmac-SIG] (no subject)

2005-05-10 Thread Bob Ippolito
On May 10, 2005, at 1:00 PM, Chris Barker wrote: > Ronald Oussoren wrote: > >> The same is true for something like DYLD_FRAMEWORK_PATH. This might >> also be >> useful for testing but can cause serious problems when you always set >> it > > Sure, but no one would mess with DYLD_FRAMEWORK_PATH in

Re: [Pythonmac-SIG] py2app and CLI Python programs

2005-05-10 Thread Bob Ippolito
On May 10, 2005, at 11:29 AM, Robert Kern wrote: > David Reed wrote: > >> I've got a command line Python app that I tried packaging up with >> py2app. It worked ok - t could cd into the subdir of the .app >> containing the executable and run it from the command line, but I'm >> not certain what it

Re: [Pythonmac-SIG] Clean Tiger install and Python 2.4.1

2005-05-10 Thread Bob Ippolito
On May 10, 2005, at 9:25 AM, Lee Cullens wrote: > Clean Tiger install and all other applications reinstalled. All > running well. > > Slowly getting there. So far I have the following up and haven't > encountered a problem yet. > MacPython-OSX-2.4.1-1.dmg > TigerPython24Fix-r2.zip > T

Re: [Pythonmac-SIG] (no subject)

2005-05-10 Thread Bob Ippolito
On May 10, 2005, at 5:14 AM, [EMAIL PROTECTED] wrote: > Bob Ippolito writes: > > >> Well, you might think that you have particularly good reasons to use >> PYTHONPATH, but pth files can do the same thing in a more predictable >> > > My particularly good reason is that I set PYTHONPATH differently

Re: [Pythonmac-SIG] Clean Tiger install and Python 2.4.1

2005-05-10 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Lee Cullens <[EMAIL PROTECTED]> wrote: > Next steps - are the following appropriate? > wxPython-2.6unicode-py2.4-macosx10.3.zip(assuming this will > work on 10.4) > TclTkAquaBI-8.4.9.1.dmg TclTkAquaBI-8.4.9.1 has a serious flaw on my MacOS X 10.3 ins

Re: [Pythonmac-SIG] Trouble with _readline package

2005-05-10 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Bob Ippolito <[EMAIL PROTECTED]> wrote: > On May 9, 2005, at 7:13 PM, Russell E. Owen wrote: > >After...(installing the binary _readline for MacOS X 10.3 with vanilla > >Python 2.3.0) > >my startup script ...failed. > > It sounds like somehow your readline.so got

Re: [Pythonmac-SIG] (no subject)

2005-05-10 Thread Chris Barker
Ronald Oussoren wrote: > The same is true for something like DYLD_FRAMEWORK_PATH. This might > also be > useful for testing but can cause serious problems when you always set > it Sure, but no one would mess with DYLD_FRAMEWORK_PATH in nearly so casual a way as people mess with PYTHONPATH. I

Re: [Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread Jonathan Wight
It's certainly a good idea. Writing a Spotlight plug-in is extremely straight forward - just fire up Xcode 2 and create a new "Metadata Importer" project. You just have one function that you need to provide: Boolean GetMetadataForFile(void* thisInterface, CFMutableDictionaryRe

Re: [Pythonmac-SIG] Clean Tiger install and Python 2.4.1

2005-05-10 Thread Lee Cullens
Thanks Robert, I'll give wx a try then, but hold off on TclTkAqua till I see what I need. I thought I remembered Bob saying I might need it, but can't find the note. One tries to make sure they don't leave anything important behind with a "clean" instal, but inevitably does :~) Lee C On

Re: [Pythonmac-SIG] py2app and CLI Python programs

2005-05-10 Thread Robert Kern
David Reed wrote: > I've got a command line Python app that I tried packaging up with > py2app. It worked ok - t could cd into the subdir of the .app > containing the executable and run it from the command line, but I'm > not certain what its current working directory was since when I tried

[Pythonmac-SIG] Spotlight and Python

2005-05-10 Thread David Reed
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 do

[Pythonmac-SIG] py2app and CLI Python programs

2005-05-10 Thread David Reed
I've got a command line Python app that I tried packaging up with py2app. It worked ok - t could cd into the subdir of the .app containing the executable and run it from the command line, but I'm not certain what its current working directory was since when I tried to specify a file on the

Re: [Pythonmac-SIG] Clean Tiger install and Python 2.4.1

2005-05-10 Thread Robert Kern
Lee Cullens wrote: > Clean Tiger install and all other applications reinstalled. All > running well. > > Slowly getting there. So far I have the following up and haven't > encountered a problem yet. > MacPython-OSX-2.4.1-1.dmg > TigerPython24Fix-r2.zip > TigerPython23Compat.pkg >

Re: [Pythonmac-SIG] Clean Tiger install and Python 2.4.1

2005-05-10 Thread Charles Hartman
On May 10, 2005, at 9:25 AM, Lee Cullens wrote: > Have also reinstalled WingIDE which is working well (with Python > 2.3.5). Will someone remind me what to point to (in the WingIDE > perfs) to use Python 2.4 please? In Project menu, Properties, Python Executable -- mine (on Tiger) points to /

Re: [Pythonmac-SIG] Clean Tiger install and Python 2.4.1

2005-05-10 Thread Lee Cullens
Clean Tiger install and all other applications reinstalled. All running well. Slowly getting there. So far I have the following up and haven't encountered a problem yet. MacPython-OSX-2.4.1-1.dmg TigerPython24Fix-r2.zip TigerPython23Compat.pkg RegexPlor-20050503-Tiger.zip Nex

Re: [Pythonmac-SIG] (no subject)

2005-05-10 Thread Ronald Oussoren
On 10-mei-2005, at 11:14, [EMAIL PROTECTED] wrote: > Bob Ippolito writes: > > >> Well, you might think that you have particularly good reasons to use >> PYTHONPATH, but pth files can do the same thing in a more predictable >> > > My particularly good reason is that I set PYTHONPATH differently in

Re: [Pythonmac-SIG] (no subject)

2005-05-10 Thread konrad . hinsen
Bob Ippolito writes: > Well, you might think that you have particularly good reasons to use > PYTHONPATH, but pth files can do the same thing in a more predictable My particularly good reason is that I set PYTHONPATH differently in different shell environments for testing purposes. Changing