Version numbers in traceback

Martin von Loewis loewis at informatik.hu-berlin.de
Wed Jul 25 16:13:16 CEST 2001


Dale Strickland-Clark <dale at riverhall.NOSPAMco.uk> writes:

> Is there a standard way for a module to register its version number so that it is reported by
> traceback or other debugging tools.
> 
> I thought something nice and simple like 
> 
> _Module_Version_ = '10.5C'
> 
> would be nice.

The standard constant for a module version is __version__. However,
there is no way to integrate it into a traceback. Instead, debugging
tools would need to find out the module of each function in the
traceback themselves (which sometimes cannot be done), and then access
the __version__ if desired. I don't think that the traceback module
should fetch __version__, though.

Regards,
Martin




More information about the Python-list mailing list