Tools for turning Python code into XMI?

Stefan Schwarzer sschwarzer at sschwarzer.net
Fri Nov 5 12:34:35 CET 2010


Hi Lawrence,

I missed your answer because I didn't expect someone to
respond after all this time. :-)

On 2010-10-30 04:07, Lawrence D'Oliveiro wrote:
>> I'm looking for a tool which can read Python files and write
>> a corresponding XMI file for import into UML tools.
> 
> UML ... isn’t that something more in vogue among the
> Java/DotNet corporate-code-cutter-drone crowd?

I don't know, that may well be. I still find it useful from
time to time. I don't mind using tools I find useful,
regardless who else uses them. :-)

> Specifically, you’re asking for something that can parse a
> dynamic language and generate a static structural
> description of that code. I don’t think it’s possible, in
> general.

The tools I described in my previous post go a great length
towards extracting the necessary information. But of course
it's not reliably possible to extract all information, for
example dynamically generated methods. But few Python
programs use this extensively, and a good tool will extract
most of the information interesting for me. I'm always
surprised about what Pylint finds out about my source code. :)

Given the existing open source tools, the problem rather
seems to be the effort of implementing XMI generation than
to get the information out of the Python code in the first
place.

Stefan



More information about the Python-list mailing list