Last active
August 29, 2015 14:12
-
-
Save elmotec/c48e4f88f66f0d2d039b to your computer and use it in GitHub Desktop.
Switch between versions of Python.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rem remove any PYTHONHOME setting. | |
@set PYTHONHOME= | |
@rem first sets python path so we can run uniquepath. | |
@set PYTHON=C:\Python%1 | |
@set PYTHONSTARTUP=%HOME%\scripts\startup.py | |
@dir %PYTHON% > NUL | |
@if ERRORLEVEL 1 GOTO FAILED | |
@set PATH=%PATH%;%PYTHON% | |
@rem Keep Python27 at the end of the PATH string to allow Vim to find Python27.dll | |
call uniquepath --remove *Python* --append %PYTHON% --append %PYTHON%\Scripts PATH --append %PYTHON%\Tools\Scripts --append C:\Python27 | |
@goto SUCCESS | |
:FAILED | |
@echo %PYTHON% is not a valid directory. | |
@set ERRORLEVEL=1 | |
:SUCCESS | |
@rem Keep pylint directory local. | |
@SET PYLINTHOME=pylint.d | |
@exit /B %ERRORLEVEL% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment