Python at compile - possible to add to PYTHONPATH

Serge Orlov serge.orlov at
Wed Jun 21 19:24:20 EDT 2006

On 21 Jun 2006 15:54:56 -0700, rh0dium <steven.klass at> wrote:
> Hi all,
> Can anyone help me out.  I would like to have python automatically look
> in a path for modules similar to editing the PYTHONPATH but do it at
> compile time so every user doesn't have to do this..
> Soo...
> I want to add /foo/bar to the PYTHONPATH build so I don't have to add
> it later on.  Is there a way to do this?

You don't need to recompile python. Just change sys.path before all
import statements.

More information about the Python-list mailing list