[IPython-User] session settings

Catherine Devlin catherine.devlin@gmail....
Thu Mar 28 12:31:09 CDT 2013


Is there a recommended way for the user to set session-wide
settings/variables?  I want to define something like

In [27]: %agree
Out[27]: u'Yes, of course!'

In [28]: lang='japanese'

In [29]: %agree
Out[29]: 'Hai!'

One way would be

ip = IPython.core.ipapi.get()
ip.user_ns['lang']

But I don't know if the setting ``lang`` should necessarily take the form
of a plain old variable in the user's namespace... really, I don't know
what's the proper IPythonic way and how to do it.

(really, I want to set a wrap/nowrap variable for %%sql, but that is more
verbose to demonstrate)

I realize this is probably in the docs somewhere, but I haven't been able
to find it myself.  Thanks very much!

-- 
- Catherine
http://catherinedevlin.blogspot.com

PS https://github.com/catherinedevlin/ipython-sql getting very close to
releasability!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130328/4e108442/attachment.html 


More information about the IPython-User mailing list