[IPython-dev] ipy_editor.py: textmate function

Brian Granger ellisonbg.net@gmail....
Tue Nov 25 18:50:06 CST 2008


Matt,

Thanks for this code, I am adding it right now.  But when I tested it,
it doesn't properly execute the code after editing.  Did you get this
to work?

I saw a couple of different things:

* New file

If I do %edit newfile.py

I get:

In [15]: edit newfile.py
Editing... done. Executing edited code...
Could not open file <newfile.py> for safe execution.

This all happens _before_ I edit, save and close the file.  It looks
like -w is not working?

* When a file already exists, the old, preedited version gets executed.

Could you look into ways of fixing these things?

Cheers,

Brian


IPython gives an error
On Tue, Nov 25, 2008 at 2:44 PM, Matt Foster <matt.p.foster@gmail.com> wrote:
> Hi,
>
> You can add TextMate support to ipy_editor.py like this (-w means wait):
>
> def mate(exe = 'mate'):
>    """ TextMate, the missing editor"""
>    install_editor(exe + '-w -l $line "$file"')
>
> I've attached a patch.
>
> Cheers,
>
> Matt
>
> --
> Matt Foster | http://hackerific.net
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
>
>


More information about the IPython-dev mailing list