inheriting from curses window-objects

Marco Herrn herrn at gmx.net
Tue Mar 19 18:55:16 EST 2002


On Tue, Mar 19, 2002 at 07:58:23PM +0000, Gerhard Häring wrote:
> Marco Herrn wrote in comp.lang.python:
> > Hi,
> > 
> > i would like to create window-objects that are derived from the standard
> > curses windows (like window or pad). But I don't see any way to achieve
> > this.
> > Is this possible?
> 
> No. But there's help:
> 
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52295

That seems not a bad idea.

> > Or would I have to write a "new curses library" to get real objects
> > for window, one can inherit from?
> 
> Fortunately, that's not needed. If you want to write a patch to make
> curses objects subclassable and submit it at Sourceforge, I'm sure it
> will be appreciated. By me, at least :-).

I am thinking about using tinter. There are some elements like dialog
boxes etc. already done as classes. I could inherit from them and create
some additional classes like for ordinary windows and so on.
I think that would do it quite well.
Possibly that is easier than to write everything by myself.

Bye
Marco
-- 
The more we disagree, the more chance there is that at least one of us is
right.

--
Marco Herrn             herrn at gmx.net
(GnuPG/PGP-signed and crypted mail preferred)
Key ID: 0x94620736




More information about the Python-list mailing list