tags:

views:

1965

answers:

5

The question is not the same as What’s the best way to generate a UML diagram from Python source code?, but the other way around.

Topcoder UML tool automatically generates code in only Java or C#. Since I need to create a very depended data structure at a point, I am hesitant to turn to Java. I want to use Python. So:

  1. Is there an UML-like tool that automatically generates Python code from your diagram?

  2. If there is, is it possible to generate it from the Topcoder UML tool?

  3. Can you shortly compare the tools?

+2  A: 
  • PyUML - a Python Roundtrip Tool for Eclipse
  • PyIdea: PyNSource UML & Patterns IDE for Python
Brandon E Taylor
Can I get PyUML for Easy Eclipse?
Masi
Can you do reverse engineering with PyUML?
Masi
http://www.philroche.net/archives/python-and-uml/. A nice blog a out some tools in this area.
Ted Johnson
A: 

Some tools:

ThibThib
Does gaphor do Python reverse engineering? Or is it a UML diagramming tool written in Python/GTK+?
S.Lott
+1  A: 

The Umbrello UML modeller for KDE support Python as an export language.

Mark
A: 

Search with Ubuntu found:

$ apt-cache search python uml
boa-constructor - RAD tool for Python and WxWindows application
dia2code - a dia-UML code generator
spe - Stani's Python Editor

Quick testing revealed that DIA is the only program, where you can export your UML diagram to Python. I am very suspicious about the quality of DIA because it is less intuitive to use than the Topcoder UML program. Perhaps, the other programs, suggested by other repliers, are better.

Masi
+3  A: 

Enterprise Architect is able to generate python code code from UML diagrams.
It is also able to also perform some reverse engineering, and therefore maintain the two versions (UML and python) synchronized together.

However, I have never used it in that way, except for some small tests just to see it in action. I personally find productivity in Python so high, that even if I am really satisfied with EA, I prefer it just to document the design.

Roberto Liffredo
+1: I use UML for conceptual sketches. The real code is so easy to write that big, formal, detailed UML isn't helpful.
S.Lott
EA only works for windows. sorry for it. I would want to try it on my mac.
NullPointer