Richard Fish wrote:
> I use code something like this to create, for example, a GtkEntry that
> will hold 10 characters:
>
> length=10
> e=GtkEntry()
> e.set_max_length(length)
> e.set_usize((length+2)*9,-1)
>
> The formula in set_usize I got by trial and error, using the default
> font. I'm not sure how to do this in a non-font-specific manner.
oh fine, that will do it ;-)
> You want select() -- search the Python library reference...
actually there's a more comfortable solution for that ... I use
something like
this now:
pipe = popen(command, "r")
self.gtag = input_add(pipe, GDK.INPUT_READ, self.ReadOutput)
def ReadOutput(self, pipe, readwrite):
line = pipe.readline()
if (line == ""):
pipe.close()
input_remove(self.gtag)
else:
self.output.insert_defaults(line)
There is some problem with buffering, but that's not too bad :)
> Some programs do this with backspaces, others with carriage returns.
> Some use real terminal addressing. In the first two cases, you've got a
> chance. I don't know how you would handle the terminal addressing case
> though...
<snip>
I'm gonna try that piece of code, thanks a lot !
James said something about some terminal emulation thingie in the gnome
wrapper, maybe this can handle all cases :)
Thanks for your help !
Martin
> --
> Richard Fish Enhanced Software Technologies, Inc.
> Software Developer 4014 E Broadway Rd Suite 405
> [EMAIL PROTECTED] Phoenix, AZ 85040
> (602) 470-1115 http://www.estinc.com
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Interesting company :) I've been trying bru2000 once (the version which
has been
shipped with RedHat 5.1), but I didn't get it to work within a minute,
so I
didn't mess around with it any longer (I don't really need backup
software for
my old 400MB streamer ;-))
--
Martin Preishuber - Student, ECLiPt Member, SysAdmin
http://eclipt.uni-klu.ac.at,
mailto:[EMAIL PROTECTED]
Gravity:
What you get when you eat too much and too fast.
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]