[IPython-dev] User Namespace

Madhusudan C.S madhusudancs@gmail....
Mon Jan 2 01:34:53 CST 2012


Hi,
   It is common to use Django and other such frameworks
on the console mode with all the Django/framework related
API libraries already imported to the namespace. This
simplifies a lot of stuff when experimenting. Django provides
support for IPython. I work on Melange project (which is a tool
that runs the Google Summer of Code and Google Code-in
programs), for which I have extended this to work with the
Django, Google Appengine and Melange's API itself. It is
a simple and usual embed TerminalInteractiveShell instantiation
with all these APIs imported. Nothing special or fancy about
it. The snippet is like this:

from IPython.frontend.terminal.embed import TerminalInteractiveShell
shell = TerminalInteractiveShell(user_ns=context)
shell.mainloop()

I would like to extend the same for an IPython qtconsole or the
notebook. How do I import the namespace to these console's?

-- 
Thanks and regards,
  Madhusudan.C.S

Blogs at: www.madhusudancs.info
My Online Identity: madhusudancs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20120102/a8830229/attachment.html 


More information about the IPython-dev mailing list