Home | History | Annotate | Download | only in scripts

Lines Matching full:path

1 """Add Python to the search path on Windows
3 This is a simple script to add Python to the Windows search path. It
17 PATH = "PATH"
18 DEFAULT = u"%PATH%"
21 pythonpath = os.path.dirname(os.path.normpath(sys.executable))
22 scripts = os.path.join(pythonpath, "Scripts")
26 userscripts = os.path.join(userpath, "Scripts")
32 envpath = _winreg.QueryValueEx(key, PATH)[0]
37 for path in (pythonpath, scripts, userscripts):
38 if path and path not in envpath and os.path.isdir(path):
39 paths.append(path)
42 _winreg.SetValueEx(key, PATH, 0, _winreg.REG_EXPAND_SZ, envpath)
48 print "Path(s) added:"
51 print "No path was added"