B
Bob van der Poel
I'm working on a moderately sized application and I'm planning on having
a fair number of modules. The only question in my mind is: where do I
put the modules ... and how do I let python know about them?
I could put them with the rest of the python lib, but I'm not really
presumtious to do that.
I can keep them all in the current directory, but that forces the user
to chd to a certain location all the time.
Best, I think, is to put them in a program specific location. My program
needs some other data files, etc. so I'm thinking that I can just put
the python stuff in /usr/local/lib/MYPROGRAM/modules.
Okay, but what about when I'm just working on them? In this case I'd
like them to be in my current working dir.
Is there a magic line I need to add to the top of the main module to set
the path up?
Apologies if this is covered in a document...but I can't see to find
anything. Maybe this is a faq?
a fair number of modules. The only question in my mind is: where do I
put the modules ... and how do I let python know about them?
I could put them with the rest of the python lib, but I'm not really
presumtious to do that.
I can keep them all in the current directory, but that forces the user
to chd to a certain location all the time.
Best, I think, is to put them in a program specific location. My program
needs some other data files, etc. so I'm thinking that I can just put
the python stuff in /usr/local/lib/MYPROGRAM/modules.
Okay, but what about when I'm just working on them? In this case I'd
like them to be in my current working dir.
Is there a magic line I need to add to the top of the main module to set
the path up?
Apologies if this is covered in a document...but I can't see to find
anything. Maybe this is a faq?