In trunk. Thanks.

On Aug 17, 3:38 pm, dkuhlman <dkuhl...@rexx.com> wrote:
> The interface to the embedded shell in IPython has apparently
> changed.  When I do:
>
>     $ ./web2py -S myapp
>
> I get this message:
>
>     WARNING:web2py:import IPython error; use default python shell
>
> Here is a patch.  It seems to work, but I'll admit that I'm not too
> sure that it does everything that it should.  Or, is there some other
> place where I should post this?
>
> # ==================================================================
> --- shell.py.orig       2011-08-17 13:27:33.888019538 -0700
> +++ shell.py    2011-08-17 13:25:07.778019604 -0700
> @@ -216,12 +216,9 @@
>                          'import bpython error; trying ipython...')
>              else:
>                  try:
> -                    import IPython
> -                    # following 2 lines fix a problem with IPython;
> thanks Michael Toomim
> -                    if '__builtins__' in _env:
> -                        del _env['__builtins__']
> -                    shell = IPython.Shell.IPShell(argv=[],
> user_ns=_env)
> -                    shell.mainloop()
> +                    from IPython.frontend.terminal.embed import
> InteractiveShellEmbed
> +                    shell = InteractiveShellEmbed(user_ns=_env)
> +                    shell()
>                      return
>                  except:
>                      logger.warning(
> # ==================================================================
>
> - Dave

Reply via email to