Cannot launch system-installed hg from local hg repository (was: Cannot launch hg from own repository)
Kevin Smith
yarcs at qualitycode.com
Mon Jun 27 20:46:25 UTC 2005
Giuseppe Bilotta wrote:
> The problem is that sys.path (the path where Python looks for modules)
> includes . before the site-lib, so the hg modules loaded are the ones
> in the repo (and the binary ones don't exist!) instead of the system
> (installed) ones.
>
> How could this be solved?
Windows traditionally has an implied . at the beginning of the path.
That is, at a C> prompt, any command you try will first look in the
current directory for a .exe .cmd .bat etc, and then will search the
path. It appears that Python is honoring this convention.
One traditional approach is to rename the app when you copy it to your
bin directory. But it means you have to train your fingers to type
different commands depending on whether you want to run the stable
version or the working copy one.
I don't know if there is a way to get Python to not search . first.
Kevin
More information about the Mercurial
mailing list