"Portability" (was: How to create a Unix Domain Socket?)

Christian Tanzer tanzer at swing.co.at
Thu Oct 19 11:45:47 EDT 2000


Donn Cave <donn at u.washington.edu> wrote:

> Realistically, though, it's a little queer for a MacOS application
> to have no User Interface, or a tty-like console window.  In practice
> I suspect that there aren't many Python applications in actual use that
> run across platforms without any platform-specific tweaks - is that true?

Just counted.

In 279 python modules with 50580 non-comment, non-whitespace lines,
6 modules contain a total of 17 lines of the form: 

    if sos.name == "nt" :

Most of these if's contain just a few statements. More than half of
the if statements are due to small differences in the GUI
(different key bindings, differences in TK's behavior, ...).

These modules are used by three substantial applications and lots of
small scripts. They use Tkinter for the user interface and work on
Win32 and Linux/Unix. 

I don't know about the Mac, but I guess if Tkinter works there my
applications should work there too -- they might need a few more if
statements, though. 

IMHO, that's pretty portable. 

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92





More information about the Python-list mailing list