Ekstrak semua namespace dari file xml python

import xml.etree.ElementTree as ET

my_namespaces = dict([node for _, node in ET.iterparse('file.xml',
                                                        events=['start-ns'])])
Fair Fowl