Hi Alex.

Alex Romosan <[EMAIL PROTECTED]> (12/11/2008):
> as intended, i guess, this patch breaks loading modules from the
> current directory but i have scripts that need to load extra modules
> from the current directory. how does one do it now? i've modified my
> scripts to do
> 
> import sys
> sys.path.append(".")
> 
> import Module

You could also set PYTHONPATH, I guess? (Though untested, I only recall
having done so when hacking some pythonish stuff, having some modules
under lib/, so that scripts under bin/ could use them.)

> but this seems silly. shouldn't the current directory be appended to
> the end of the system path so system modules are loaded first and then
> if they don't exist they are loaded from the current directory?

That might be done, but I'm not very inclined to relax that sanity check
to allow “userscripts” again; I'm sorry, I kind of prefer having people
deliberately add “.” as you mentioned to having possible security holes
(not as obvious as previously, but I guess one could craft something).

Mraw,
KiBi.

Attachment: signature.asc
Description: Digital signature

Reply via email to