JulianEberius / SublimeRope

ST2 only, use SublimePythonIDE with ST3: Adds Python completions and some IDE-like functions to Sublime Text 2, through the use of the Rope library
GNU General Public License v2.0
250 stars 26 forks source link

how add PYTHONPATH on SublimeRope? #47

Closed iddqd3 closed 11 years ago

iddqd3 commented 11 years ago

Hi In my system PYTHONPATH set in /etc/profile.d/python.sh # /etc/profile.d/python.sh export PYTHONPATH=/usr/lib/python2.7:/usr/lib/python2.7/site-packages:/home/${USER}/.local/lib/python2.7/site-packages

but Sublime Text not set this, so in Sublimerope not work "Go to Defenition"

If i'm manual add via sublime console (Ctrl+`): import sys; sys.path.append('/usr/lib/python2.7/site-packages') and set "rope_autoimport_modules" "Go to Defenition" is work

P.S sorry for my English

iddqd3 commented 11 years ago

Add rows in /your_project/.ropeproject/config.py:

prefs.add('python_path', '/usr/lib/python2.7')
prefs.add('python_path', '/usr/lib/python2.7/site-packages')

and select menu "Edit Project"

,"settings":{
    "rope_autoimport_modules":
    [
        "django.*"
    ]
}