Re: Fwd: [pygtk] A weird problem with raw_input and zvt




> This is getting weirder but NOW I KNOW.
> 
> It is not any of the below.
> 
> Here goes, my prompt is like this:
> 
> "\033[0;34mGIn["+ str(self.history_index) +"] :=3D \033[0;39m"
> 
> See I am making it blue then going back.

All this will break readline, because it includes non-printint characters.
It wont know how wide the terminal actually is and will do cursor ups
and stuff at the wrong time.

So yes, it is basically that it has the wrong idea of terminal size.

> So it seems, it doesn't like those escape sequences.

zvt doesn't hav e aproblem with that.

> My question is, what is the escape sequance that resets it all!

 \033[0m 

will reset terminal attributes.

Try perhaps putting a newline in the prompt, afte rthe colour stuff.
Otherwise, stick to a plain prompt.

 Michael

> Thanks again
> 
> 
> >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
> 
> On 11/22/99, 5:05:47 PM, zucchi@zedzone.mmc.com.au (NotZed) wrote=20
> regarding Re: Fwd: [pygtk] A weird problem with raw_input and zvt:
> 
> 
> > Whatever you're running in the terminal doesn't know the real
> > terminal size.
> 
> > Do something like
> >  eval `resize`
> 
> > to check/verify/set the real terminal size.
> 
> > >
> > >
> > >  Ok,
> > >
> > > I sent the message below to pygtk list thinking I did something wron=
> g.
> > >
> > > Now I am sure it's a zvt bug. I am using october-gnome btw.
> > >
> > > Ok, I did not and could not reproduce exactly, what is described=3D2=
> 0
> > > below, in gnome-terminal, BUT if you write a loong line then try to=3D=
> 20
> > > get back with arrow then your line will start going nuts.
> > >
> > > If this has been known then apologies. Otherwise, tell me and I'll=3D=
> 20
> > > submit a bug report if needed!
> > >
> > > Also, if I type raw_input('promt: ') in my app, all is well. This=20
> is=3D20
> > > really weird!
> > >
> > >
> > >
> > >
> > > >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
> > >
> > > On 11/14/99, 11:09:12 PM, Hassan Aurag <aurag@CRM.UMontreal.CA> wrot=
> e=3D20
> > > regarding [pygtk] A weird problem with raw_input and zvt:
> > >
> > >
> > > >  Hi,
> > >
> > >
> > > > I have an app that creates a zvt term in a gnome-app and forks and=
> 
> > > > calls another python script that handles input output etc....
> > >
> > > > The way I handle input is by using raw_input(prompt)
> > >
> > > > Now if I type a line long enough to go onto the next line, it won'=
> t
> > > > and instead will overwrite the first line. This happens only in th=
> e
> > > > first line and it gets redrawn if I use the left arrow (I have
> > > > imported readline to be able to do that). For all other lines of t=
> he
> > > > same input, everything is ok.
> > >
> > > > Now, I haven't been able to reproduce this even with the zterm.py
> > > > example provided with pygnome package. I even used raw_input there=
> =20
> and=3D
> > >
> > > > all is fine.
> > >
> > > > The only difference between zterm.py and my thinggy is that one is=
>  in
> > > > a Gtkwindow and the other is in a GtkHBox which itself is in a
> > > > GnomeApp
> > >
> > > > Any idea why this happens?
> > >
> > >
> > > > H. Aurag
> > >
> > >
> > >
> > >
> > > > To unsubscribe: echo "unsubscribe" | mail pygtk-request@daa.com.au=
> 
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe: mail gnome-devel-list-request@gnome.org with=20
> "unsubscribe"
> > > as the Subject.
> > >
> > >
> 
> 
> 
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]