UML Packages And Python Modelling

Nick Efford nde at comp.leeds.ac.uk
Tue Jul 24 08:13:29 EDT 2001


On Tue, 24 Jul 2001 01:29:11 +0200,
Lothar Scholz <llothar at mailandnews.de> wrote:

> I'm writing an UML Diagram Editor for python and would like to ask the
> community what entity is an UML package. My first idea was that a file
> is the logical equivalent, not the directory (likejava.and eiffel
> programmers would expect). But then what is a directory ?
> Should this be represented by a nested package ?

A Python module could be drawn as a UML package.  The module
name would go in the tab at the top-left of the package icon.
The implementation of a module (.py, .so, .dll...) could be
shown using component diagram syntax.

A Python package would map onto the nested package UML syntax.
So (borrowing the package example from "Python Essential Reference")
if you have a package Graphics, containing subpackage Primitive,
containing module fill.py, you could draw that as a regular UML
package, but with the name Graphics::Primitive::fill in the tab.


Nick



More information about the Python-list mailing list