This matches my system's `/usr/bin/ipython-2.7`, and is the hook
defined in IPython's setupbase.py:
'ipython%s = IPython.frontend.terminal.ipapp:launch_new_instance'
This should handle the 'notebook' option internally.
"""Creates a terminal-based IPython entry point for msysgit"""
output_file = open(python_scripts_directory + 'ipython', 'w')
file_contents = """#!/usr/bin/env python
-import sys
-from IPython.frontend.html.notebook.notebookapp import launch_new_instance as launch_notebook
-from IPython.frontend.terminal.ipapp import launch_new_instance as launch_ipython
-
-def main():
- if len(sys.argv) > 1 and sys.argv[1] == 'notebook':
- sys.exit(launch_notebook())
- else:
- sys.exit(launch_ipython())
-
-if __name__ == '__main__':
- main()
+from IPython.frontend.terminal.ipapp import launch_new_instance
+launch_new_instance()
"""
output_file.write(file_contents)