[Tutor] Import vs #include

Kent Johnson kent37 at tds.net
Fri Sep 18 22:49:18 CEST 2009


On Fri, Sep 18, 2009 at 4:15 PM, Warren Marshall <epicboy at gmail.com> wrote:
>
> Excellent, OK, this is becoming clearer ...
>
> So if I wanted a common library of code that several Python apps would be
> using, best practices would say I should put that into a directory that the
> projects can see and import it as a package.module.  Cool...

Yes, and if you want to share it with all python programs, put your
dir into Lib/site-packages - that dir is always on the python search
path.

Kent


More information about the Tutor mailing list