You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changeset [[https://bitbucket.org/agr/rope/changeset/b4e28f313b17|b4e28f313b17]] assumes distutils is installed, and that's not always the case, as distutils is not part of Python's standard library.
The change was for OS X specific workaround, but it should be enabled only for that platform (where distutils seems to be installed by default).
The older code was not ideal either, because it reported back the path to the stdlib of the interpreter actually running that function, and not the system wide interpreter.
Point in case: An editor that has an embedded Python interpreter, for which a plugin adds rope's support, would report, on Windows, for example, "python26.zip", while it would be better if it reported "c:\python26\libs" instead.
Maybe rope should allow this setting to be changed from the .ropeproject.py file. That seems the most general solution to me.
The text was updated successfully, but these errors were encountered:
As a possible solution, I would change that function into this:
{{{
#!python
def _stdlib_path():
try:
# Try to get Python's libs path from the systems's default python interpreter.
import subprocess
args = ['python', '-c', 'import os; print os.path.dirname(os.file)']
return subprocess.Popen(args, stdout=subprocess.PIPE).communicate()[0].splitlines()[0]
except OSError:
# Get the Python's libs path for the interpreter executing this function.
import os
return os.path.dirname(os.file)
}}}
Changeset [[https://bitbucket.org/agr/rope/changeset/b4e28f313b17|b4e28f313b17]] assumes distutils is installed, and that's not always the case, as distutils is not part of Python's standard library.
The change was for OS X specific workaround, but it should be enabled only for that platform (where distutils seems to be installed by default).
The older code was not ideal either, because it reported back the path to the stdlib of the interpreter actually running that function, and not the system wide interpreter.
Point in case: An editor that has an embedded Python interpreter, for which a plugin adds rope's support, would report, on Windows, for example, "python26.zip", while it would be better if it reported "c:\python26\libs" instead.
Maybe rope should allow this setting to be changed from the .ropeproject.py file. That seems the most general solution to me.
The text was updated successfully, but these errors were encountered: