Metadata-Version: 2.1
Name: solentware-bind
Version: 1.0.1
Summary: Bind and exception handling for tkinter callbacks.
Author-email: Roger Marsh <roger.marsh@solentware.co.uk>
License: Licence for solentware_bind package
        Copyright (c) 2022, Roger Marsh
        All rights reserved.        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:                
        Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.        
        Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.        
        Neither the name of the owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.                
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        
Project-URL: Homepage, http://www.solentware.co.uk
Project-URL: Repository, https://github.com/RogerMarsh/solentware-bind.git
Project-URL: Bug Tracker, https://github.com/RogerMarsh/solentware-bind/issues
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 3 - Alpha
License-File: LICENCE

=============================
Event bindings and exceptions
=============================

.. contents::


Description
===========

This package provides wrappers to catch exceptions in `tkinter`_ callbacks and use the identifiers returned by tkinter bind and tag_bind methods to avoid memory leaks.  The `idlelib`_ module provided examples to follow.


Installation Instructions
=========================

This package is available on PyPI so can be installed by typing

   python -m pip install --user solentware-misc

at the command prompt.

See `Python`_ and `pip`_ documentation for alternatives and platform-specific points.


Notes
=====

The docstring for tkinter.Misc.bind() states, at Python 3.9.14, "Bind will return an identifier to allow deletion of the bound function with unbind without memory leak.".

The docstrings for tkinter.Misc.bind_all(), tkinter.Misc.bind_class(), tkinter.Canvas.tag_bind(), and tkinter.Text.tag_bind(), refer to the docstring for tkinter.Misc.bind().

Wrappers for tkinter.Misc.bind_all() and tkinter.Misc.bind_class() are not provided.

The solentware_bind project exists to avoid solentware_base and solentware_grid depending on each other.  The exceptionhandler and gridbindings modules were in solentware_misc before the bindings module was added.


.. _tkinter: https://python.org
.. _Python: https://python.org
.. _idlelib: https://python.org
.. _pip: https://packaging.python.org/installing
