Skip to content

Instantly share code, notes, and snippets.

@georgexsh
Created August 5, 2016 10:03
Show Gist options
  • Save georgexsh/ddf6605a487f98404160c310f9d04040 to your computer and use it in GitHub Desktop.
Save georgexsh/ddf6605a487f98404160c310f9d04040 to your computer and use it in GitHub Desktop.
ipython unicode literals on startup
from IPython.terminal.ipapp import TerminalIPythonApp
app = TerminalIPythonApp.instance()
context = make_shell_context()
app.exec_lines = ['from __future__ import unicode_literals',]
app.user_ns = context
app.initialize(argv=['--no-banner',])
app.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment