Wow - great Bob. If I had looked there first I would not have bothered anyone, and since there are also answers to questions I haven't asked yet I'll go there first for Mac related Python issues. Especially when I embark on your new 2.4 download :~)

Thanks again,
Lee C


PS: One point I didn't notice in my first quick pass through relates to your recently mentioning not to use Package Manager anymore. I checked out (and bookmarked) the newer package list you posted but there is one thing I miss. Being a foggy headed old man (with post-its all over) I liked how the package manager told me if I had something installed. Is the only work around to search with finder and check the version in get info?


If you had already answered this question also, then just ignore me and I'll know to dig deeper.




On Mar 31, 2005, at 11:42 PM, Bob Ippolito wrote:


On Mar 31, 2005, at 11:32 PM, Lee Cullens wrote:

OS X 10.3.8 with the Mac Python add ons (and new to both Mac and Python)

To keep a learning project together I'm creating my module files in a folder within my account. Not using any fancy IDE yet I brought up PythonIDE and (of course) the first import of one of my modules failed. Having read about a .pth file I created a one liner with a full path to my learning project folder and then looked around for where to put it. I noticed other .pth files in /Library/Python/2.3 so I put it there and now the imports of my modules work.

The point here is though this worked, is this the correct (normally accepted) way to do such. That is, keeping a project's "unique" modules in an isolated folder (or folder structure), creating a .pth file to such and placing that file in /Library/Python/2.3?

Yes it's a perfectly good way to do it. I would go as far as saying the best way of doing it, especially on Mac OS X.


If you want to localize this to your specific account, ~/Library/Python/2.3/site-packages is also a respected location for doing it (you will probably need to create this folder). When using the Python 2.4.1 build I would use ~/Library/Python/2.4/site-packages -- the normal site-packages path is deep within the framework.

The tilde (~) means your home directory, if you're not familiar with the unix terminology. Also note that Finder's cmd-shift-G "Go to folder..." dialog also knows about tilde.

If someone has already elaborated on this subject then please just point me at the piece.

http://bob.pythonmac.org/archives/2005/02/06/using-pth-files-for- python-development/


If you poke around elsewhere on my blog, and on http://pythonmac.org/wiki/ (particularly the FAQ) you should find some interesting stuff...

-bob


_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to