forked from heeres/qtlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathipython.bat
executable file
·52 lines (43 loc) · 1.28 KB
/
ipython.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
:: ipython.bat
:: Runs IPython like in qtlab.bat, without actually starting QTLab.
::
:: Useful for testing and debugging.
:: Add Console2 to PATH
SET PATH=%CD%\3rd_party\Console2\;%PATH%
:: Check for version of python
:: Enthought Python Distribution
IF EXIST c:\epd27\python.exe (
SET PYTHON_PATH=c:\epd27
GOTO mark1
)
:: Anaconda Python Distribution
IF EXIST C:\Anaconda\python.exe (
SET PYTHON_PATH=C:\Anaconda
GOTO mark1
)
:: Standard distributions
IF EXIST c:\python27\python.exe (
SET PYTHON_PATH=c:\python27
GOTO mark1
)
IF EXIST c:\python26\python.exe (
SET PYTHON_PATH=c:\python26
GOTO mark1
)
echo Failed to find python distribution. Update path in qtlabgui.bat
:mark1
:: Run iPython
:: check if version < 0.11
IF EXIST "%PYTHON_PATH%\scripts\ipython.py" (
start Console -w "IPython" -r "/k %PYTHON_PATH%\python.exe %PYTHON_PATH%\scripts\ipython.py -p sh"
GOTO EOF
)
:: check if version >= 0.11
IF EXIST "%PYTHON_PATH%\scripts\ipython-script.py" (
start Console -w "Ipython" -r "/k %PYTHON_PATH%\python.exe %PYTHON_PATH%\scripts\ipython-script.py"
GOTO EOF
)
::start Console -w C:\Anaconda\pythonw.exe "C:\Anaconda\Scripts/ipython-script.py" qtconsole
echo Failed to run ipython.bat
pause
:EOF