From: W. Trevor King Date: Wed, 20 Mar 2013 22:42:49 +0000 (-0400) Subject: swc-windows-installer.py: Simplify `ipython` wrapper X-Git-Tag: v0.1~37 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=482f838f7479aa7658a211a8ce7e46e55ddd365d;p=swc-setup-windows-installer.git 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. --- 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)