#16483: manage.py shell does not work with the latest IPython release (0.11.rc2) -------------------------------------+------------------------------------- Reporter: croach | Owner: croach Type: Bug | Status: new Milestone: | Component: Core (Management Version: SVN | commands) Resolution: | Severity: Normal Triage Stage: Accepted | Keywords: Needs documentation: 0 | Has patch: 1 Patch needs improvement: 0 | Needs tests: 0 UI/UX: 0 | Easy pickings: 0 -------------------------------------+-------------------------------------
Comment (by minrk): Does the previous code actually not work, or is this purely prompted by the IPython docs? A few points: 1. You don't have to handle any fallbacks, there have been no releases of IPython without IPShell, and both `TerminalInteractiveShell` and embed() are introduced in 0.11, to be released this week. 0.11 is a major reorganization of IPython, so some imports were in flux early on, but these have not changed in a year. 2. embed() is for invoking a special `InteractiveShell` that uses the calling scope to initialize the user namespace (i.e. `self` will be defined if you use it as proposed here). Is that what you want? embed() is typically used in debugging, as it lets you have a full IPython shell at breakpoints. 3. `manage.py shell` appears to work just fine with IPython master today (to be 0.11 final very soon) and django release 1.3, but I'm not familiar with how IPython is supposed to be different than usual when invoked by django, so maybe that's not accurate. The only change that should probably be made is that `TerminalInteractiveShell` should be imported from `IPython.frontend.terminal.interactiveshell` (where it's always been defined), not `IPython.frontend.terminal.embed`, which just happens to also import it. -- Ticket URL: <https://code.djangoproject.com/ticket/16483#comment:3> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.