[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10194: Acknowledgement (24.0.91; Python scripts run by python-load-f
From: |
Reuben Thomas |
Subject: |
bug#10194: Acknowledgement (24.0.91; Python scripts run by python-load-file cannot use eggs installed in home directory) |
Date: |
Sat, 3 Dec 2011 00:30:00 +0100 |
I think I've found the bug: emacs2.py's eimport overwrites sys.path[0]
while loading the given file. sys.path[0] is normally '' (the current
directory), but by default Emacs removes this entry when starting up
Python (python-remove-cwd-from-path), and so instead sys.path[0] is
some non-empty path element, and modules on it cannot be found when
loaded via eimport.
A workaround is to set python-remove-cwd-from-path to nil, but to work
properly, eimport should prepend the file's path to sys.path, thereby
allowing modules to be loaded from the current directory if
python-remove-cwd-from-path is nil, as currently that won't work
either.
--
http://rrt.sc3d.org