bzr using cwd in pythonpath?

Jan Hudec bulb at ucw.cz
Wed Nov 30 19:07:56 GMT 2005


On Wed, Nov 30, 2005 at 13:21:26 +0200, Alexander Belchenko wrote:
> Jamie Wilkinson пишет:
> >This one time, at band camp, Andrew Bennetts wrote:
> >
> >>tokenize usually gets N_TOKENS from "from token import *", but in your 
> >>case I'll
> >>bet its finding token.py in your current directory.
> >>
> >>This is definitely something that should be fixed...
> >
> >
> >So, bug in tokenize, or bug in bzr's sys.path?
> 
> I think it is known limitation/bug of python sys.path mechanism.
> But we could remove '.' from sys.path for avoiding problems.

Um, wait a second... That first entry in sys.path (besides being '', not '.')
means the directory where the script lives, *NOT* current working
directory. So unless you have '.' in your $PATH, which on UNIX you should
NEVER have, you still run the installed bzr even in the directory containing
another bzr.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051130/4d9ddfa4/attachment.pgp 


More information about the bazaar mailing list