Why the default sys.path[0] insertion? (It breaks my code.)

Robb Shecter rs at onsitetech.com
Fri Dec 20 12:23:55 EST 2002


Hi,

Thanks for your comments you sent in email.  One other thing occurred to 
me.  You wrote:

> ...But it is a lot more convenient when files inside a
> particular package can refer to one another without needing special
> sys.path settings.
> 

It sounds like you mean that you use the fact that path[0] contains the 
package's directory.  But this is completely random, isn't it?  It 
depends on how the module is executed / imported.

Robb




More information about the Python-list mailing list