a portable text user interface ?

Andrae Muys amuys at shortech.com.au
Tue Feb 12 19:54:43 EST 2002


joost_jacob at hotmail.com (J.Jacob) wrote in message news:<13285ea2.0202080524.e2e7948 at posting.google.com>...
> With a module like this included in the Python distribution you could
> make
> simple text based user interfaces that work on Windows, linux, *nix
> and Mac
> that dont flicker, that is, if it is well implemented.  It looks so
> simple but
> it really is not.  You would need to know how to do things on all
> platforms.
> I tried and gave up, besides i do not have access to much OS's to test
> things
> with.  Doing this for linux and unix is simple with the curses module,
> but
> Windows? Mac?  The pdcurses and WConio modules i found for Windows
> need
> compilation etc., couldnt test/install them properly (no MS compiler
> here).
> Cygwin Python has partially implemented curses but then you need to
> have Cygwin installed.

AFAIK cygwin's curses implementation is complete, at least it's
sufficient to permit lynx/mutt/links/etc to compile and run.  They
require far more x-platform functionality then you do :).  You also
don't require cygwin installed, just the associated dll's, in this
case the cygwin, cygncurses, and probably cygpanel/cygmenu dll's
(IIRC).  ie. <22k, which is hardly an excessive demand :).

The most likely restriction, and the reason I suspect it hasn't been
included in the Python windows distribution by default, is that cygwin
is GPL'd, so if you want to distribute a turn-key proprietary
application you will need to license an GPL exemption from RedHat
(http://www.redhat.com/software/tools/cygwin/buycontract.html).

OTOH, as the ncurses library itself is under the MIT license, if you
don't want to pay RedHat you could,
a) port it yourself.
b) let the user link the python wrapper against cygwin themselves
before using your application.

both of which are permitted under the GPL.

Still many UI projects have little or no exclusitivity or sale value,
and are developed strictly for their use value.  In such cases, just
pick your favourite OSS license and you can link freely against
cygwin.

Andrae Muys



More information about the Python-list mailing list