Add directory to PYTHONPATH ( multiple drives ), for auto-complete
I have 2 hard-drives, C:\
and D:\
Django imports correctly (which is in my C
drive), but my application is on my D
drive. I can't move it to the C
drive because of some back-up software I'm running/
I'm trying to get auto-complete to work in Komodo Edit 5 which works fine for Django, but not for my application. There are a few other reasons for wanting this as well (one of them being my rampant OCD). I have added D:\dev\projects
to my PYTHONPATH
and my application is a couple folders deep from there. I included a ;
between variables but not at the end, and I left off the trailing slash. I'm on Win XP. Here's my exact PYTHONPATH in my settings:
C:\Python26\Lib\site-packages\django-trunk;D:\dev\projects
and here is my Python path as a list output by os.environ['PYTHONPATH'].split(os.pathsep)
['C:\\Python26\\Lib\\site-packages\\django-trunk', 'D:\\dev\\projects']
Why doesn't this work? Django runs OK for my app that is there, but I understand that Django sets an environment variable dynamically in manage.py. I don't get it. I've restarted my computer, and now I'm pulling out my hair.
Have you tried adding Additional import directories in Edit/Preferences/ under Languages/Python in Komodo?
Edit: I think you can also add a .pth file in [komodo-install-dir]/lib/mozilla/python/ or C:\[PythonVersion]\Lib\site-packages\ containing all other path you might want to be available. Not sure wich way is more appropriate in your case.
精彩评论