Dear Holger!

Am 03.03.22 um 15:38 schrieb Holger.Joukl@LBBW.de:
I admit I don’t fully understand the issue (I don't use PyCharm and don't know how
it presents objects in debugging). To me, it seems easy enough to just do s.th. like

In PyCharm (and I think in any reasonable IDE these days) you have a full Python entity representation on any call-stack levels in the debugger

https://backend.datenadler.de/kram/bildschirmfoto-vom-2022-03-03-17-39-44.png/image_view_fullscreen

In this example you see (part of) the representation of an ISO19139 file in the PyCharm debugger. If you compare the source xml-file

https://backend.datenadler.de/kram/31591bca-bb40-4d8a-98ad-35efc37524c9.xml/view

with this image, you will notice that no gco:CharacterString Elements are shown. Because they are not in __dict__/dir().

Does PyCharm use elem.__dict__ or dir(elem) to present an object's attributes
in debugging?

Exactly.

To make this long discussion short. As I wrote earlier: Neither the current state of LXML nor my hackish version is really good. One solution real solution may be to include the namespace (represented via its prefix) in the property/Entity name.

Therefore I am currently working on enabling LXML to have <prefix>_<name> properties in objectify. The changes are not too complicated since the source code quality is good. I am hopeful that after the weekend I will have full functional prototype.

The __dict__ is already working but the class-representation has still some problems to be solved.

Cheers,

Volker

-- 
=========================================================
   inqbus Scientific Computing    Dr.  Volker Jaenisch
   Hungerbichlweg 3               +49 (8860) 9222 7 92
   86977 Burggen                     https://inqbus.de
=========================================================