[Python-checkins] CVS: python/dist/src/Lib/lib-tk Tkinter.py,1.137,1.138
A.M. Kuchling
python-dev@python.org
Sun, 18 Jun 2000 11:45:52 -0700
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory slayer.i.sourceforge.net:/tmp/cvs-serv10064/Lib/lib-tk
Modified Files:
Tkinter.py
Log Message:
Patch from /F:
this patch adds a fast _flatten function to the _tkinter
module, and imports it from Tkinter.py (if available).
this speeds up canvas operations like create_line and
create_polygon. for example, a create_line with 5000
vertices runs about 50 times faster with this patch in
place.
Index: Tkinter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v
retrieving revision 1.137
retrieving revision 1.138
diff -C2 -r1.137 -r1.138
*** Tkinter.py 2000/03/30 23:19:44 1.137
--- Tkinter.py 2000/06/18 18:45:50 1.138
***************
*** 40,43 ****
--- 40,46 ----
return res
+ try: _flatten = _tkinter._flatten
+ except AttributeError: pass
+
def _cnfmerge(cnfs):
if type(cnfs) is DictionaryType:
***************
*** 55,58 ****
--- 58,64 ----
cnf[k] = v
return cnf
+
+ try: _cnfmerge = _tkinter._cnfmerge
+ except AttributeError: pass
class Event: