How to create ones own lib

Francesco Bochicchio bieffe62 at
Wed Aug 19 11:30:10 CEST 2009

On 19 Ago, 11:00, Horst Jäger <h.jae... at> wrote:
> Hi,
> I would like to create my own lib "" which I can import like
>         import string,hotte
> . How do I do that?
> I'm working on MacOS 10.5.6 .
> Thanks in advance

Just create the file '' and place it somewhere python can find
it, that is:
- in the same directory of the code using it (which is most probablyt
what you want to do )
- in a directory listed in  sys.path variable (which you can extend
using sys.path.append("full_path_of_my_library_directory") before
doing import hotte

There are other options, but these should cover your needs.


More information about the Python-list mailing list