[Tutor] Tutor Digest, Vol 88, Issue 56

Steven D'Aprano steve at pearwood.info
Thu Jun 16 15:33:44 CEST 2011


WolfRage wrote:

> ****CODE BELOW****
> #!/usr/bin/python3
> """With this method I can make the class "Screen" become "stdscr" but if
> I refernce any of the new methods or properties the applications
> promptly fails and notifies me that the attribute does not exist."""

That's because it doesn't exist.

stdscr is a curses window, which does not have an attribute "height". I 
think you want

self.Screen.getmaxyx()

which will return a tuple (height, width) of the window.




-- 
Steven


More information about the Tutor mailing list