def tkVersionWarning(root):
 if isCocoaTk():
  patchlevel = root.tk.call('info', 'patchlevel')
  if (patchlevel not in ('8.5.7', '8.5.9')):
   return False
  return 'WARNING: The version of Tcl/Tk ({0}) in use may be unstable.\\nVisit http://www.python.org/download/mac/tcltk/ for current information.'.format(patchlevel)
 else:
  return False

def tkVersionWarning ( root ) : if isCocoaTk ( ) : patchlevel = root . tk . call ( 'info' , 'patchlevel' ) if ( patchlevel not in ( '8.5.7' , '8.5.9' ) ) : return False return 'WARNING: The version of Tcl/Tk ({0}) in use may be unstable.\\nVisit http://www.python.org/download/mac/tcltk/ for current information.' . format ( patchlevel ) else : return False
returns a string warning message if the tk version in use appears to be one known to cause problems with idle .