in UML, there seems to be no element that is the equivalent of a module in python, or at least i haven't figured it out yet.
a module in python, represented by one .py-file, has a header where the imports are denoted. it can contain many classes, all classes are in the modules namespace and can talk to each other directly and have access to the packages/modules/classes that the module has imported. how can i draw this in a diagram?
update 1: finally, i stumbled upon a webpage, where i found something, that seems to be relevant... on this website(http://www.alan-g.me.uk/l2p/tutclass.htm) in the chapter "Mixing Classes and Modules", the author says:
"...We can represent that graphically in UML in two ways. The logical grouping of the classes can be represented using a Package or we can represent the physical file as a component...."
if that is correct, a module in python is like a component in UML. i am still trying to figure out, how this can work(because a component in UML seems to me not to be the same as a module in python), and how exactly and in which diagram(s) i can model it.
update 2: i am testing it with visual paradigm community edition(without it's code-generation-feature). for now, i was able to see, that in the UML-model, the component-element has a folder-like behaviour, like a package. and when i hover with the mouse over the classes that are contained in a component, i can see the effect i wanted, of the component representing an own namespace.
now(if this is the right way to model it), where can i specify, which other packages/modules/classes this one module shall import? when i select a package in visual paradigm, it offers me an option to import packages. but when i select a component, no import-functionality is offered. thanks a lot in advance.