Where should I put my HTMLgen directory?

Anders M Eriksson anders.eriksson at morateknikutveckling.se
Tue Jun 13 11:19:11 EDT 2000


On Tue, 13 Jun 2000 15:05:08 +0200, Max Møller Rasmussen
<maxm at normik.dk> wrote:

>I am trying to install HTMLGen on my machine.
>
>My python is installed in:
>C:\Program Files\Python\Lib\HTMLgen
>

I will assume that you mean: C:\Program Files\Python

>I have unpacked HTMLGen into:
>C:\Program Files\Python\Lib\HTMLgen
>
>
>So obviously I am doing something wrong. I thought that Python traversed the
>Lib diretory recursively to find any modules. But no?
>

This is a bit confusing! I'm not sure myself on how it really work. 

>Should I put all the *.py* files in the root of Lib? That seems a bit messy
>to me.

I think you have 3 alternatives:

1)	Add the subdirectory to the PYTHONPATH (which on Windows is in
the registry)

2)	Create a package (create an empty file called __init__.py in
the HTMLgen directory)

3)	create a HTMLgen.pth file in the lib directory. This file
should only contain the directory name HTMLgen


//Anders
Maybe-some-Guru-could-create-a-document-explaining-python-import




More information about the Python-list mailing list