From c86050bc3be63397219ae651c1200673e9480e7f Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 4 Mar 2019 07:40:08 -0800 Subject: [PATCH] Use ipython when available. --- dotfiles/ipython.py | 4 ++++ dotfiles/zshrc.d/ipython.zsh | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 dotfiles/ipython.py create mode 100644 dotfiles/zshrc.d/ipython.zsh diff --git a/dotfiles/ipython.py b/dotfiles/ipython.py new file mode 100644 index 0000000..f758bda --- /dev/null +++ b/dotfiles/ipython.py @@ -0,0 +1,4 @@ +import os, IPython +os.environ['PYTHONSTARTUP'] = '' # Prevent running this again +IPython.start_ipython() +raise SystemExit diff --git a/dotfiles/zshrc.d/ipython.zsh b/dotfiles/zshrc.d/ipython.zsh new file mode 100644 index 0000000..6dd7b40 --- /dev/null +++ b/dotfiles/zshrc.d/ipython.zsh @@ -0,0 +1,3 @@ +if which ipython >/dev/null 2>/dev/null ; then + export PYTHONSTARTUP="${HOME}/.ipython.py" +fi