IPython TextMate Bundle: Future Directions

Posted by matt
on Tuesday, December 09

IPython Server

Now that the IPython TextMate bundle has been around for a little while, and has struck a chord with the TextMate wielding, IPython hacking community, I decided that now might be a good time to sum up a few of my ideas for the future.

I’ve really been heartened by the response and enthusiasm of the IPython community, and of particular note is the work by Brain Granger. Brian is currently working on a Twisted based editor server for TextMate (and other editors too), with a block based protocol for robust communications. You can find some initial work in Launchpad, and grab it using bazaar using:

lp:~ellisonbg/ipython/textmate-server

Just be aware that this branch/link might not be around for long.

My top priority for the bundle with regards to this is the creation of a client library, probably also based on Twisted. It would be great to have this core library included in IPython, so it can be called on by other editors.

Core Bundle Content

I think that the core of the bundle is fairly coherent (at least for me!), with the most useful commands appearing at the top of the list. I ideally though, all communications with IPython should be done through the server, so the debugging commands need work in that respect.

My top priority for this area is the implementation of a more user-friendly preferences / config. method. Here’s my initial stab at creating a nib. I now need to work out how best to hook it up with tm_dialog, to store the preferences. Hopefully recent changes to dialogs in TM will make this easier.

IPython Preferences
Uploaded with plasq’s Skitch!

Snippets / Scipy

A lot of IPython users, myself included, are using IPython for scientific computing and number crunching. For that reason, decent support for scientific python libraries is essential.

Thanks to Ben Racine, we’ve got some decent snippets for scipy/numpy/pylab, and we’re adding more fairly regularly. Feel free to send me your ideas, and I’ll be sure to implement them if I can.

Documentation and Demos

The bundle documentation is fairly complete, and since it’s combined with the README, it’s fairly easy to maintain. This is a good thing.

Demo-wise, so far there’s only the first screencast I made. I’m extremely surprised to see it has over 200 views, so I’m planning on making more short and sweet screencasts, which we can hopefully integrate with the bundle’s help.

You Contributions

Are very, very welcome. Please join the [google group](http://groups.google.com/group/ipython-tmbundle/ “ipython-tmbundle | Google Groups”), or if you’re a gihubber, you can fork the bundle, make your own changes and send me a pull request. Only with help can we make this bundle all it can be.

Screencast: IPython Bundle Demo

Posted by matt
on Wednesday, November 19

I’m very pleased to announce that the IPython TextMate bundle is in a state where it can actually be used – you can probably consider it to be a pre-beta.

To celebrate this, I’ve made a simple screencast demoing some of the basic features.


IPython TextMate Bundle Demo from Matt Foster on Vimeo.

This screencast can also be downloaded, and I hope to give a quick overview of some of the more advanced features in a follow-up.

The main features of the bundle are:

  • Communication with IPython via the extension ipy_vimserver. This means the bundle should work right out of the box: just run import ipy_vimserver; ipy_vimserver.setup('session'), and you can connect.
    • running the current file in IPython
    • running the current line / selection in IPython
    • running the current file / selection / line in IPython with the profiler enabled
    • growl notification of salient points
    • rudimentary syntax highlighting of ipythonrc files, including warnings about broken comments
    • commands for editing the ipythonrc file and .ipython directory
    • built in help
    • access from a single key binding.

The bundle can be downloaded from GitHub or installed via GetBundles. For installation help, see the README.

We’d love to hear your feedback, so please send comments, suggestions and feedback to either the ipython-dev list (please prefix the subject with [TextMate]), or the [ipython-tmbundle google group](http://groups.google.com/group/ipython-tmbundle/ “ipython-tmbundle | Google Groups”) (just reply to this email).

Thanks!

Announcing the IPython TextMate Bundle

Posted by matt
on Friday, November 14

After being shown the huge potential of mixing TextMate with IPython via a little applescript, I started work on the IPython TextMate bundle. I also set up a google group, and talked to the ipython-users mailing list. Their response was great, and they’ve allowed us to discuss the project on the ipython-dev list, if we tag message subjects with [TextMate]. There’s also a possibility that we can distribute the bundle with IPython in the future!

Current features in the bundle are mostly related to interaction with IPython in a Terminal (specifically Terminal.app), and make use of applescript, and include:

  • running the current file in IPython
  • running the current line / selection in IPython
  • running the current file / selection / line in IPython with the profiler enabled
  • toggling the state of the debugger (setting this to ON will switch into the debugger when an exception occurs)
  • entering the debugger
  • adding breakpoints to the current file
  • removing those breakpoints
  • growl notification of salient points
  • rudimentary syntax highlighting of ipythonrc files, including warnings about broken comments (you can’t have a directive and a comment on the same line)
  • commands for editing the ipythonrc file and .ipython directory
  • built in help

Most of these functions are accessed by pressing (⌃⇧I), which gives you a list from which you can select the item you wish to activate. This is similar to the Git / Svn bundles. This means you need only remember one shortcut.

Re: ipython_menu
Uploaded with plasq’s Skitch!

You can grab this now, from GitHub or GetBundles. Please send feedback, ideas or comments to the ipython-dev mailing list, the google group, or directly to me.