aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Griffiths <msjgriffiths@gmail.com>2014-10-28 12:47:21 -0700
committerAndrew Or <andrew@databricks.com>2014-10-28 12:47:33 -0700
commitf0c571760040c998d83ad87d08e104b38bfc19f7 (patch)
treed07837b34fa8cf6f29a57ea6855dbd665efa9523
parent286f1efb0554f055de5dfc0b317b1dff120ce5a0 (diff)
downloadspark-f0c571760040c998d83ad87d08e104b38bfc19f7.tar.gz
spark-f0c571760040c998d83ad87d08e104b38bfc19f7.tar.bz2
spark-f0c571760040c998d83ad87d08e104b38bfc19f7.zip
[SPARK-4065] Add check for IPython on Windows
This issue employs logic similar to the bash launcher (pyspark) to check if IPTYHON=1, and if so launch ipython with options in IPYTHON_OPTS. This fix assumes that ipython is available in the system Path, and can be invoked with a plain "ipython" command. Author: Michael Griffiths <msjgriffiths@gmail.com> Closes #2910 from msjgriffiths/pyspark-windows and squashes the following commits: ef34678 [Michael Griffiths] Change build message to comply with [SPARK-3775] 361e3d8 [Michael Griffiths] [SPARK-4065] Add check for IPython on Windows 9ce72d1 [Michael Griffiths] [SPARK-4065] Add check for IPython on Windows (cherry picked from commit 2f254dacf4b7ab9c59c7cef59fd364ca682162ae) Signed-off-by: Andrew Or <andrew@databricks.com>
-rw-r--r--bin/pyspark2.cmd7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/pyspark2.cmd b/bin/pyspark2.cmd
index a0e66abcc2..59415e9bde 100644
--- a/bin/pyspark2.cmd
+++ b/bin/pyspark2.cmd
@@ -59,7 +59,12 @@ for /f %%i in ('echo %1^| findstr /R "\.py"') do (
)
if [%PYTHON_FILE%] == [] (
- %PYSPARK_PYTHON%
+ set PYSPARK_SHELL=1
+ if [%IPYTHON%] == [1] (
+ ipython %IPYTHON_OPTS%
+ ) else (
+ %PYSPARK_PYTHON%
+ )
) else (
echo.
echo WARNING: Running python applications through ./bin/pyspark.cmd is deprecated as of Spark 1.0.