Skip to content

Instantly share code, notes, and snippets.

@janpipek
Created June 10, 2015 12:50
Show Gist options
  • Save janpipek/9404176e0532b7a4cc14 to your computer and use it in GitHub Desktop.
Save janpipek/9404176e0532b7a4cc14 to your computer and use it in GitHub Desktop.
Hack Pycharm to start IPython 3.1
# This file should replace ${CHARM_DIR}/helpers/pycharm/pycharm_load_entry_point.py
import os, sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
dist = os.environ.get("PYCHARM_EP_DIST")
name = os.environ.get("PYCHARM_EP_NAME")
if dist == "ipython" and name == "ipython":
from IPython import start_ipython
f = start_ipython
else:
f = load_entry_point(dist, "console_scripts", name)
sys.exit(f())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment