[IPython-user] Tab complete problem under Cygwin -- Also GnuplotRuntime.py

Travis Caldwell travis_caldwell2000 at yahoo.com
Mon Jun 28 21:28:32 CDT 2004


 I tried typing a string longer then the terminal line length on both
the bash.exe shell and in an xterm.

 On the bash.exe shell, everything seemed to work fine except the first
line wrapped 25 chars to soon. Deleteting back upto the first line
worked fine and so did up/down arrow command history.

 In the xterm, the line indeed went nuts when I wrapped the first line.
It wrapped too soon and typed over itself and the arrow history was all
wrong.

 Also, I tried running with the numeric profile under cygwin and hit
two issues.

 1) Gnuplot.py doesn't support the persist option under cygwin (in
gp_cygwin.py). GnuplotRuntime.py checks for os.name in ['nt','dos']
and if true doesn't set the persist option.

 Unfortunately, under my copy of cygwin os.name returns 'posix' and the
persist option causes Gnuplot.py to raise an exception.

 The gp.py file in the Gnuplot.py package uses sys.platform to
determine the platform type so I added:

elif sys.platform == 'cygwin' :
    gnuplot_runtime = 0

to line 93 of GnuplotRuntime.py. This seemed to fix things.

 2) This is probably a Gnuplot.py issue, but line 60 of gp_cygwin.py
had default_temr= 'windows' and my cygwin version of gnuplot doesn't
have a terminal setting for windows, so I changed this to x11 and it
seemed to work.

         _Travis_Caldwell_

--- Fernando Perez <Fernando.Perez at colorado.edu> wrote:
> Travis Caldwell wrote:
> >  I installed the cygwin rxvt package and it also displays the same
> > behavior.
> > 
> >  Here is the output of 'echo $TERM' for all three shells:
> > 
> >  bash.exe     cygwin
> >  rxvt         xterm
> >  xterm        xterm
> 
> Thanks.  It's a bummer that rxvt also shows the problem, I could have
> sworn it 
> didn't.  Oh well...
> 
> >  In my Prompts.py file, the line you mentioned is at line 47 and it
> > reads:
> > 
> >  InputColors = ultraTB.InputTermColors # just a shorthand
> 
> Right, I was quoting from CVS.
> 
> > 
> > I changed it as you suggested and now the problem has gone away.
> > 
> >  Thanks!
> 
> Not so fast :)  It turns out that the different classes (TermColors
> and 
> InputTermColors) exist for a reason.  If you use TermColors, some of
> the 
> escaping bugs _seem_ to go away, but then you get (under Unix) the
> following 
> problem: long lines which get to the edge of the terminal go crazy.
> 
> It's hard to describe, but try (with the 'fix' in place) to type a
> line long 
> enough that it would wrap in your terminal.  Long ago the
> InputTermColors 
> class had to be introduced to allow readline to correctly compute the
> line 
> length, because otherwise as you got to the edge of the screen (or
> just after 
> wrapping), the cursor handling would go nuts.
> 
> Only if we can confirm that this 'fix' doesn't reintroduce the
> long-line bug 
> under cygwin, will I be willing to consider including the code.  So
> this will 
> need fairly detailed testing from cygwin users.
> 
> >  I've only scratched the surface of what IPython has to offer, but
> so
> > far everything else has worked for me under cygwin.
> 
> I hope you like it in the future.
> 
> Cheers,
> 
> f
> 



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 




More information about the IPython-user mailing list