Opened 9 years ago

Closed 9 years ago

#403 closed defect (fixed)

Add ipython support to ./bin/gmg shell

Reported by: Christopher Allan Webber Owned by: hugomatic
Priority: major Milestone: 0.3.0
Component: component1 Keywords:
Cc: Parent Tickets:

Description

It would be great if we could launch ipython optionally like:

  ./bin/gmg shell --ipython

There's some code in werkzeug's codebase that looks like it does this the right way.

        if ipython:
            try:
                try:
                    from IPython.frontend.terminal.embed import InteractiveShellEmbed
                    sh = InteractiveShellEmbed(banner1=banner)
                except ImportError:
                    from IPython.Shell import IPShellEmbed
                    sh = IPShellEmbed(banner=banner)
            except ImportError:
                pass
            else:
                sh(global_ns={}, local_ns=namespace)
                return
        from code import interact
        interact(banner, local=namespace)

If we borrow a significant chunk of this code, we should annotate correctly:

http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html

Subtickets

Change History (2)

comment:1 Changed 9 years ago by Christopher Allan Webber

Owner: changed from somebody to hugomatic
Status: newassigned

comment:2 Changed 9 years ago by Christopher Allan Webber

Resolution: fixed
Status: assignedclosed

This is merged actually! Thanks Hugo!

Note: See TracTickets for help on using tickets.