From: Marko Samastur [mailto:email@example.com]
Why .pth files ? Why not simply *copy* the code to site-packages ?
Mainly, but not only, because of estetic reasons. My project already has 26 .py files and this number will only rise.
Dumping them all in one directory (and other authors doing the same), would just make that directory look like a trashcan and could also result in filename conflicts (which can be otherwise avoided if certain modules in subdirectories are never directly imported).
So why not make your stuff a proper package? That's the correct way of handling this. If you don't want your users to have to cope with multi-level names, you can always do some magic in __init__.py. But frankly, multi-level names shouldn't be seen as a problem to be overcome - they are a *convenience* to avoid name clashes, and should be used for that purpose.
On Wednesday 10 April 2002 12:11, you wrote:
So why not make your stuff a proper package? That's the correct way of
Because I didn't know how to do it until now (I know, it's written in Tutorial, but it's been a while since I last read it). Of course you are right, that's more clean way to do it.
Thank you and Marc for your help.