Creating a sub folder in the pythons LIB Directory
Gre7g Luterman
hafeliel at yahoo.com
Sat May 19 10:19:56 EDT 2007
<tedpottel at gmail.com> wrote in message
news:1179582729.526366.13130 at p77g2000hsh.googlegroups.com...
> Hi,
>
> I am creating a library of functions. I would like to have them saved
> in a sub folder of pythons LIB folder, but I cannot get it to work.
>
> I have a script called test.py
> I stored it in LIB folder and typed
> Import test, work fine.
> I store the script in lib/ted
> Then type
> Import lib\ted
Try "import ted.test" or "from ted import test". I also recommend reading
http://www.python.org/doc/essays/packages.html as it explains how to use
__init__.py files.
More information about the Python-list
mailing list