On May 15, 2010, at 12:46 AM, Iceberg wrote:

> Mysteriously, using sys.path.insert(...) rather than
> sys.path.append(...) does help. But I just don't understand. I used to
> think that the build-in import statement always goes through all
> folders inside sys.path, one by one, so in theory it does not matter
> whether a path appears in sys.path earlier or later. (Unless two
> different version of same name module exist in two different path, but
> it is not the case this time.)  //shrug   Any explanation for that,
> Jonathan?

No, that sounds mysterious to me as well. 

One possibility is that sys.path starts off with '', which I take to be the 
current directory. So using append makes it sensitive to the cwd. Either that 
or there's a collision that isn't obvious at first glance....

Reply via email to