Getty fully qualified class name from class object

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Aug 22 12:13:08 EDT 2023


On 23/08/23 2:45 am, Ian Pilcher wrote:
> How can I programmatically get 'logging.Handler' from the class object?

Classes have a __module__ attribute:

 >>> logging.Handler.__module__
'logging'

-- 
Greg




More information about the Python-list mailing list