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("HH HH", 0, 0, 0, 0)
fd_stdout = sys.stdout.file no()
x = fcntl.ioctl(fd_ stdout, termios.TIOCGWI NSZ, s)
print '(rows, cols, x pixels, y pixels) =',
print struct.unpack(" HHHH", x)
And got this result:
(36, 96, 0, 0)
Looks like a tuple to me. return 'return' instead of 'print' the result.
We don't mind helping, but it's nice to know that the user has made some
attempt to understand what is going on before asking for free work to be
done.
j
--
Joshua Kugler
Lead System Admin -- Senior Programmer
Comment