This is a new version of _tkinter.c that works with Tcl/Tk 8.0. It
was derived from the version in the Python 1.5a3 distribution with
removal of a few lines that don't work in Python 14. To use it,
simply copy this on top of Modules/_tkinter.c in the Python 1.4
distribution. It works with earlier versions of Tcl/Tk too, notably
7.6/4.2 and 7.5/4.1, but *not* with Tcl/Tk 7.4/4.0 or earlier.
--Guido van Rossum (home page:
http://www.python.org/~guido/), 21-Aug-1997
... and, for some more detailed instructions case roole responded to
a query in comp.lang.python. Though specifically framed for
RedHat Linux folk, steps 2 and 3 should be generally applicable ...
From
[email protected] Tue Sep 9 13:37:42 1997
Date: Tue, 9 Sep 1997 19:32:59 +0100 (WET DST)
From: Case Roole <
[email protected]>
To: "Bradley W. Owen" <
[email protected]>
Cc: Python <
[email protected]>
Subject: Re: New tkinter.c on Linux
> I have a RedHat 4.2 Linux setup and I would like to update
> Python to be able to use Tcl/Tk 8.0. I downloaded the file from the Python
> site (_tkinter.c) but I don't know how to use it, since there is no
> tkinter.c on my system. Any suggestions?
You have to replace the _tkinter.c file in ./Modules in the python source
and then do a "make sharedinstall". I don't know how far you've got so far,
so let's start from scratch:
1. Unpack the python SRPMS. From the rpm manual I understand that the
command should be "rpm -bp <file>" which would install the sources and apply
the patches according to which the sources are compiled to become the Redhat
binaries that you use. Eh, actually, I never managed to get the sources in
this state. You're on your own here. (If anyone knows how to install patched
sources with rpm, please mail me!)
2. Say your sources are in /usr/src/redhat/SOURCES/python-1.4. Replace the
_tkinter.c in ./Modules with the one you obtained.
Edit ./Modules/Setup to change the libraries to link _tkinter.c with.
That is, replace the -ltk4.2 -ltcl7.6 with -ltk8.0 -ltcl8.0 to reflect your
usage of tcl/tk 8.0. You might have to specify the directory in which these
libraries are located, by preceding the above string with, say,
-L/usr/local/lib.
3. 'make install' in the main directory should be OK. Alternatively, you can
do a 'make', then cd to ./Modules and do a 'make sharedinstall' there to
install only the shared modules (after all, your system already has
everything but the new _tkinter.so).
4. Enjoy!
--
Case Roole <
[email protected]>
+++
The supreme maxim in scientific philosophizing is this: Whenever possible,
logical constructions are to be substituted for inferred entities.
--Bertrand Russell