Re: getting terminal display size?

2007-02-26 Thread jeff
I don't really understand any of that; can you right me a function that'll return the size as a tuple? -- http://mail.python.org/mailman/listinfo/python-list

Re: getting terminal display size?

2007-02-26 Thread Joshua J. Kugler
jeff wrote: I don't really understand any of that; can you right me a function that'll return the size as a tuple? Did you even *try* his code? I ran this: import termios, fcntl, struct, sys s = struct.pack(, 0, 0, 0, 0) fd_stdout = sys.stdout.fileno() x = fcntl.ioctl(fd_stdout,

Re: getting terminal display size?

2007-02-26 Thread Grant Edwards
On 2007-02-27, jeff [EMAIL PROTECTED] wrote: I don't really understand any of that; can you right me a function that'll return the size as a tuple? What do you think I posted? -- Grant Edwards grante Yow! I selected E5... but

Re: getting terminal display size?

2007-02-26 Thread jeff
On Feb 26, 8:01 pm, Grant Edwards [EMAIL PROTECTED] wrote: On 2007-02-27, jeff [EMAIL PROTECTED] wrote: I don't really understand any of that; can you right me a function that'll return the size as a tuple? What do you think I posted? -- Grant Edwards grante

getting terminal display size?

2007-02-25 Thread jeff
I looked around a lot on the internet and couldn't find out how to do this, how do I get the sizer (in rows and columns) of the view? -- http://mail.python.org/mailman/listinfo/python-list

Re: getting terminal display size?

2007-02-25 Thread Jean-Paul Calderone
On 25 Feb 2007 16:53:17 -0800, jeff [EMAIL PROTECTED] wrote: I looked around a lot on the internet and couldn't find out how to do this, how do I get the sizer (in rows and columns) of the view? Assuming you're talking about something vaguely *NIXy, you want something like what's being done

Re: getting terminal display size?

2007-02-25 Thread Grant Edwards
On 2007-02-26, jeff [EMAIL PROTECTED] wrote: I looked around a lot on the internet and couldn't find out how to do this, how do I get the sizer (in rows and columns) of the view? You use the TIOCGWINSZ ioctl() call on the tty device in question. import termios, fcntl, struct, sys s =

Re: getting terminal display size?

2007-02-25 Thread Grant Edwards
On 2007-02-26, Grant Edwards [EMAIL PROTECTED] wrote: On 2007-02-26, jeff [EMAIL PROTECTED] wrote: I looked around a lot on the internet and couldn't find out how to do this, how do I get the sizer (in rows and columns) of the view? You use the TIOCGWINSZ ioctl() call on the tty device in