[Compiler-sig] PYTHONDIR and sys.path

Neal Norwitz neal at metaslash.com
Fri Jul 9 03:17:38 CEST 2004


On Thu, Jul 08, 2004 at 07:43:38AM -0400, Jeffrey Holle wrote:
> I'm using python v2.3.3 on a linux box.
> 
> I've just observed something that looks wrong.
> 
> I have the PYTHONPATH environment variable defined to add an application 
>  specific component to the python search path.
> 
> In printing sys.path, I notice that it gets copied to both the first and 
> second elements of this list.
> 
> Why twice?

This question is probably best asked on comp.lang.python or the
associated mailing list.

I don't know the answer to your question, but this problem doesn't
happen for me.  Perhaps, sys.path is being modified elsewhere in your
code or the directory is in your python path without setting
PYTHONPATH.

Neal



More information about the Compiler-sig mailing list