ez_setup.py

Paul Boddie paul at boddie.org.uk
Mon Feb 26 12:07:53 EST 2007


On 26 Feb, 17:36, Tim Golden <m... at timgolden.me.uk> wrote:
>
> OK. Keep copying to the list, please. As I said, I'm not
> a *nix person (and I'm running here on Windows) so you'll
> get a more informed and wider audience from c.l.py.

Just to clarify one thing, $HOME isn't automatically inserted into
sys.path on UNIX, at least in all versions of Python I've used.
However, the directory where an executed Python program resides may be
used in the process of locating modules: it seems to be inserted
automatically into sys.path as the first element, in fact.

So if calendar.py is in the same directory as ez_setup.py, I would
imagine that any attempt to import the calendar module will result in
the this non-standard calendar.py being found and imported, rather
than the standard library's calendar module. The most appropriate
solution is to put ez_setup.py in other location and then to run it.
For example:

mv ez_setup.py /tmp
python /tmp/ez_setup.py

Putting the non-standard calendar.py in a directory separate from
other programs might be an idea, too.

Paul




More information about the Python-list mailing list