[IPython-user] User having problems with jedit on OSX

Fernando Perez Fernando.Perez at colorado.edu
Sat Mar 19 14:17:53 CST 2005

Hi all,

I'm sending this to the list in case anyone has a better idea than me (no OSX 
machine to test on right now), and also so it gets archived for future 
reference if someone else has the same problem.

Jon is having problems with ipython trying to execute immediately the file 
he's trying to edit, so he doesn't get a chance to change anything.  I suspect 
that the problem is that the OSX 'open' command returns immediately, and 
that's what IPython uses to check when to execute the code.  So ipython things 
jedit is finished instantly, and doesn't give him a chance to actually do 
anything to the file.

Is there anyway to have the open call not return right away?  Or can one under 
OSX set $EDITOR directly to /Applications/jEdit 4.2/jEdit.app and have it work 
normally (the spaces in that path worry me)?

Another option would be to write a custom editor hook which checks on the 
process id with a wait(), the subprocess module could be used for that.  The 
editor hook can be customized as indicated in IPython/hooks.py.

I hope some of this helps, Jon.



-------- Original Message --------
Date: Sat, 19 Mar 2005 13:07:05 -0500
From: Jon Schull <jschull at digitalgoods.com>
To: fperez at colorado.edu


I'm new to, but enthusiastic about, ipython.  I'm trying to get jEdit
to work as my editor on OS X.
I've change the line in ipythonrc to

> editor open "/Applications/jEdit 4.2/jEdit.app"

and ipython does bring jEdit to the fore, but it instantly tries to

Here's a sample:

> In [1]: print 'hey'
> hey
> In [2]: print 'ho'
> ho
> In [3]: ed 2
> Editing... done. Executing edited code...
> ho
> Out[3]: "print 'ho'\n"
> In [4]: ed 1
> Editing... done. Executing edited code...
> hey
> Out[4]: "print 'hey'\n"
> In [5]: ed
> Editing...2005-03-19 13:03:18.245 open[29296] No such file: 
> /tmp/tmpSttV9V.py
>  done. Executing edited code...
> WARNING: File not found. Did you forget to save?
> In [6]:



Jon Schull, Ph.D.
Associate Professor
Information Technology
Rochester Institute of Technology
102 Lomb Memorial Drive
Rochester, New York 14623
schull at digitalgoods.com 585-738-6696

More information about the IPython-user mailing list