Show More
@@ -255,3 +255,30 b' def leo_f(self,s):' | |||
|
255 | 255 | c.endUpdate() |
|
256 | 256 | |
|
257 | 257 | ip.expose_magic('leo',leo_f) |
|
258 | ||
|
259 | def leoref_f(self,s): | |
|
260 | import textwrap | |
|
261 | print textwrap.dedent("""\ | |
|
262 | %leo file - open file in leo | |
|
263 | wb.foo.v - eval node foo (i.e. headstring is 'foo' or '@ipy foo') | |
|
264 | wb.foo.v = 12 - assign to body of node foo | |
|
265 | wb.foo.b - read or write the body of node foo | |
|
266 | wb.foo.l - body of node foo as string list | |
|
267 | ||
|
268 | for el in wb.foo: | |
|
269 | print el.v | |
|
270 | ||
|
271 | ||
|
272 | """ | |
|
273 | ) | |
|
274 | ip.expose_magic('leoref',leoref_f) | |
|
275 | ||
|
276 | def show_welcome(): | |
|
277 | print "------------------" | |
|
278 | print "Welcome to Leo-enabled IPython session!" | |
|
279 | print "Try %leoref for quick reference." | |
|
280 | import IPython.platutils | |
|
281 | IPython.platutils.set_term_title('Leo IPython') | |
|
282 | IPython.platutils.freeze_term_title() | |
|
283 | show_welcome() | |
|
284 |
General Comments 0
You need to be logged in to leave comments.
Login now