[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python.el: why remove '' from sys.path?

From: Chong Yidong
Subject: Re: python.el: why remove '' from sys.path?
Date: Sun, 15 Mar 2009 21:07:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

John Sullivan <address@hidden> writes:

> Why wouldn't the answer be to move '' to the end of sys.path, so that
> overloading the emacs module with something malicious in the current
> directory wouldn't be possible? Or how about checking the permissions of
> the current directory before removing '' from the path? Or checking an
> expected hash of the emacs and other imported-by-default modules?
> Having the current working directory be in the python path is pretty
> important to me and I think to other people as well. Moreover having the
> emacs python shell behave too differently from the standard python shell
> is a hassle.

I'm open to revisiting this.  IIRC, the issue with checking permissions
before removing '' from sys.path is that we weren't sure this would DTRT
on platforms like Windows.  As for moving '' to the end of sys.path,
that would itself be an incompatibility.

One thing to keep in mind here is that it may not be obvious to the user
that she is executing python code---if I understand correctly, the
python shell can be launched automatically when eldoc mode is on.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]