I’d like to have a module in python27\scripts\ added to the list in the path browser – tried the syntax from here: https://stackoverflow.com/a/3402196 and here: http://www.johnny-lin.com/cdat_tips/tips_pylang/path.html
import sys
sys.path.append("E:\Program Files\Python27\Scripts")
sys.path.append('E:\Program Files\Python27\Scripts')
But the interpreter returns nothing and there’s no \scripts when looking at file>path browser.
What am i doing wrong?
Edit: The folder is there, it’s also the only \python27-folder on this PC.
@Nate: ‘Paths assembled from separate strings using join() or with embedded variables might end up with extra separators or relative path components. Use normpath() to clean them up:’ – didn’t assemble my path from separate strings, also can’t figure out the syntax on this tool.
What is the “path browser”? Is it some separate program? (IDLE perhaps?)
Where are you inserting the code you posted? If you’re running it from an interpreter, the path modifications will only persist for the life of the script you’re running — they won’t permanently be added anywhere.
As Nate alluded to, backslashes can cause problems inside strings. Make sure the string is really what you think it is.
Have you tried adding the directories to the Windows environment? Under Windows 7, this is done by clicking the Start menu -> Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables, then creating a new variable called PYTHONPATH. (If these directions don’t work for you, try a google search on “windows pythonpath”.)