[Python-Dev] _tkinter and Tcl/Tk versions
artcom0!pf@artcom-gmbh.de
artcom0!pf@artcom-gmbh.de
Wed, 5 Apr 2000 08:39:56 +0200 (MEST)
Hi!
Guido van Rossum:
> Modified Files:
> FixTk.py
> Log Message:
> Work the Tcl version number in the path we search for.
[...]
> ! import sys, os, _tkinter
> ! ver = str(_tkinter.TCL_VERSION)
> ! v = os.path.join(sys.prefix, "tcl", "tcl"+ver)
> if os.path.exists(os.path.join(v, "init.tcl")):
> os.environ["TCL_LIBRARY"] = v
[...]
Just a wild idea:
Does it make sense to have several incarnations of the shared object file
_tkinter.so (or _tkinter.pyd on WinXX)?
Something like _tkint83.so, _tkint82.so and so on, so that
Tkinter.py can do something like the following to find a
available Tcl/Tk version:
for tkversion in range(83,79,-1):
try:
_tkinter = __import__("_tkint"+str(tkversion))
break
except ImportError:
pass
else:
raise
Of course this does only make sense on platforms with shared object loading
and if preparing Python binary distributions without including a
particular Tcl/Tk package into the Python package. This idea might be
interesting for Red Hat, SuSE Linux distribution users to allow partial
system upgrades with a binary python-1.6.rpm
Regards, Peter
--
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany, Fax:+49 4222950260
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen)