以下の通りです
#!/usr/bin/python # -*- coding: utf-8 -*- import ezdxf import sys def main(): file_path = sys.argv[1] doc = ezdxf.readfile(file_path, encoding='cp932') for entity in doc.query('TEXT'): key_vals = entity.dxfattribs() print( key_vals["text"] ) if __name__ == '__main__': main()