ANNOUNCE: X extension for Python

Sjoerd Mullender (Sjoerd.Mullender@cwi.nl)
Fri, 21 Apr 1995 15:40:28 +0200

This is a multipart MIME message.

--===_0_Fri_Apr_21_15:17:27_MDT_1995
Content-Type: text/plain

The X extension for Python release 1.2 is now available by anonymous
ftp from
ftp://ftp.cwi.nl/pub/python/src/X-extension.tar.gz
Preformatted documentation is available from
ftp://ftp.cwi.nl/pub/python/doc/X-extension.ps.gz
Of course, it is also possible to get these files through the
World-Wide Web. Use these URLs:
http://www.cwi.nl/ftp/python/src/index.html
http://www.cwi.nl/ftp/python/doc/index.html

The highlights:

This extension is an interface to the X Window System libraries. In
particular, there are interface to the X Toolkit, the Athena Widgets,
and the Motif Widgets. There is also an interface to the Mosaic-2.4
HTML widgets. Finally, for SGI systems, there is an interface to the
Glx widgets.

Using these extensions, it is possible to create widgets, create
colormaps and visuals, draw points, lines, texts, images, etc.

A set of demos is part of the distribution.

As a very simple example, I include a simple Hello World program as an
attachment.

For those who have used the previous release, I include the contents
of the file CHANGES, which is also part of the distribution as an
attachment.

Sjoerd Mullender, CWI, P.O. Box 94079, 1090 GB Amsterdam, The Netherlands
E-Mail: Sjoerd.Mullender@cwi.nl; Phone: +31 20 592 4127; Fax: +31 20 592 4199
URL: http://www.cwi.nl/cwi/people/Sjoerd.Mullender.html

--===_0_Fri_Apr_21_15:17:27_MDT_1995
Content-Type: text/plain
Content-Description: xhello.py

import sys, Xt, Xm

def main():
toplevel = Xt.Initialize('XHello', [], sys.argv)
hello = toplevel.CreateManagedWidget('hello', Xm.Label, {})
toplevel.RealizeWidget()
Xt.MainLoop()

main()

--===_0_Fri_Apr_21_15:17:27_MDT_1995
Content-Type: text/plain
Content-Description: CHANGES

This is a, no doubt incomplete, list of changes between this release
of the X extensions to Python and the previous one.

- There is documentation!

- The module Xm does not contain any functions anymore. Instead, the
functions are now widget methods.
The cv.py script deals with these.

- Some of the memory leaks have been plugged. Widget objects are now
actually deallocated when no longer used. Callback arguments are
now deallocated when all widgets that used them are deallocated.
Motif compound strings (variables of type XmString) are now freed
when they are no longer used. Probably not all leaks have been
plugged.

- Functions in Xlib that deal with Display variables are now methods
of a new Display object.
Affected functions:
CheckMaskEvent
NextEvent
PeekEvent
PutBackEvent
Flush
CreateFontCursor
ConnectionNumber
The cv.py script deals with these.

- More functions have been implemented.

- Bugs have been fixed. (I suppose some new bugs have been
introduced, though. :-)

- When a widget is destroyed, all its child widgets are also
destroyed. The interpreter now keeps track of destroyed widgets and
raises an exception if anything is tried on them.

- Instead of using fontobject.fid, you should now use the fontobject
itself.

- Some methods require a pixmap argument. It used to be left as an
excercise to the programmer to obtain the proper pointer value. Now
you can (must) just specify a pixmap object.

- ReadBitmapFile now returns a pixmap object as one of the elements in
the tuple.

- Many new methods and functions.

- Many new Motif widget methods.

- The XC_ prefixes have been removed from the names in
Lib/Xcursorfont.py.
The cv.py script deals with these.

- The __methods__ variable now gives all widget methods instead of
only a subset.

- The module HTML only contains a few functions now. The other
functions are now methods of HTML widgets. The cv.py script deals
with this.

- Widget methods are only methods of widgets for which it makes sense.
(E.g., FileSelectionBoxGetChild is a method of XmFileSelectionBox
widgets, and of no other.)

- The Window Attribute object has been removed. Instead, the
ChangeWindowAttributes widget method now accepts a dictionary where
the keys are the names of the struct members that are to be changed,
and the values are the new values.

- Constraint resources and Motif secondary resources are now
understood so they can be set.

--===_0_Fri_Apr_21_15:17:27_MDT_1995--