[IPython-dev] New features + Postponing 0.8.1 a little bit

Ville M. Vainio vivainio@gmail....
Fri Apr 20 11:46:34 CDT 2007


On 4/20/07, Fernando Perez <fperez.net@gmail.com> wrote:

> thoughts?

Well, I got all the changes I thought of making in already, so I don't
care either way. We can release this weekend. We might get some
problems with '%magic?' later on but that remains to be seen.

Incidentally, here's a nice demo of ipy_exportdb (and the new defmacro
and defalias):

[Extensions]|54> ipy_exportdb.export()
import IPython.ipapi
ip = IPython.ipapi.get()

# === Macros ===

ip.defmacro('exp',
 u'reload(ipy_exportdb)\n'
 u'ipy_exportdb.export()\n'
)

ip.defmacro('morjensta',
 u'print "hei"\n'
 u'print "moi"\n'
)


# === Variables ===

a = 10
b = 'oaeaoeaoe'
ip.to_user_ns("a b")

# === Bookmarks ===

ip.db['bookmarks'] = { 'aoeaoe': 'c:\\Users',
  'hai': 'c:\\home',
  'hrocau': 'c:\\Users\\Default',
  'hui': 'C:\\',
  'ipy': 'C:\\ipython'}

# === Alias definitions ===

ip.defalias('d', 'ls -F --color=auto')

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'


More information about the IPython-dev mailing list