[IPython-dev] Updates to CVS: tab completion and Windows coloring

Fernando Perez fperez at colorado.edu
Sun Dec 7 17:53:39 CST 2003

Gary Bishop wrote:
> Fernando, here are the updates you requested.

Thanks Gary, some comments below.

>>1.  You made changes to page(), to make it work with 'less' under 
>>windows+cygwin.  I want to be sure that users who DON'T have cygwin are 
>>still ok.  Is that the case?
> The changes below appear to make it work with no pager, with the "more" 
> that ships with Windows, and with "less" from Cygwin. With the 
> environment variable PAGER unset it will use iPython's pager. With 
> PAGER=more, it will use the windows more.com. With PAGER=less it will 
> use the cygwin pager. Probably works with others too. I tried this on 
> both 2.2 and 2.3.


>>2.  The code below is around line 913 of genutils.py.  Do you know 
>>which exceptions can this trigger under Windows, so we only trap those? 
>>I don't like blanket except clauses (ipython has many, but I'm trying 
>>to clean them up as much as possible).  I also added the inner 
>>try/finally to ensure proper cleanup.
> It turns out that there really weren't any exceptions possible there. 
> That is fixed in the patch below as well.

Just a quick question before I commit this version:  is the filename generated 
by mktemp guaranteed to be in a directory the user has write access to?  If 
not, an IOError exception could be triggered when trying to actually write to 
the file, couldn't it?  That's about the only thing that I can think of to 
keep the try blocks in there.  But I'd prefer it if you are right, because it 
would save a double try in the code.

> I have also uploaded changes to CVS for my readline library to make it 
> work with 2.3. All the 2.3 stuff has been only very lightly tested 
> because I don't run use it yet.

Nice.  When you get a chance (zero hurry) and this settles, I'd like to 
include a bit more info about this both as links on the webpage, and as a 
short section in the manual.  Basically the relevant links and some brief 
instructions Windows users (both with and without cygwin) can follow to use 
your tools in conjunction with ipython.

Thanks again for your work,


More information about the IPython-dev mailing list