From 482f838f7479aa7658a211a8ce7e46e55ddd365d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 20 Mar 2013 18:42:49 -0400 Subject: [PATCH] swc-windows-installer.py: Simplify `ipython` wrapper 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. --- setup/swc-windows-installer.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/setup/swc-windows-installer.py b/setup/swc-windows-installer.py index 61d1f93..3ce1fbf 100755 --- a/setup/swc-windows-installer.py +++ b/setup/swc-windows-installer.py @@ -44,18 +44,8 @@ def create_ipython_entry_point(python_scripts_directory): """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) -- 2.26.2