Re: STDWIN under Linux & Mac

Guido.van.Rossum@cwi.nl
Thu, 15 Sep 1994 10:30:20 +0200

> And speaking of STDWIN for python, is there anyone here using it on
> both X11 and the Mac, and trying to get portable programs? The
> capabilities of the two seem not to match too closely, but I might
> not understand just how it is supposed to work. I.e., under the
> Mac, stdwin.listfontnames() simply returns an empty list -- is this
> right? I'd like to be able to create a simple window that displays
> the status of the program so the user can see if progress is
> actually being made (these Macs are old, and we can never be
> certain, it seems). Does anyone have a demo program that is
> portable between the two platforms, preferably using a variety of
> fonts?

Fonts are a problem. Their syntax is different on the Mac and on X11.
Having a list of available fonts does not help since you don't know
what they mean and you can't ask each font in turn how big it is.

My approach if you want to use multiple fonts on multiple platforms:
find out on which platform you are running (e.g. 'mac' in
sys.builtin_module_names) and choose a different set of fonts (and
sizes) for each platform. That way you can tune the fonts for each
platform.

> Guido: is STDWIN still being developed, at least to bring the various
> versions into line with each other? I prefer tkinter, but immediate
> portability would be a nice feature, and quite useful!

I have no time to further develop STDWIN -- I just don't want it to
die completely, which is why I released 0.9.9 (1.0 will be out by the
time Python 1.1 comes out). There's a fairly big portable subset --
almost everything that works on the Mac also works on X11, just not
vice versa.

A student here just (almost) completed STDWIN2, which is a modified
superset with many new features -- unfortunately only an X11 version
exists. See ftp://ftp.cwi.nl/pub/fj/. If you're interested in a port
of STDWIN2 I suggest you write to Steven.Pemberton@cwi.nl who is
coordinating these efforts as far as I know (it was designed and
written at his request).

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
<URL:http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>