I organize my modules and classes. All the time I collect related classes in the appropriate module, so I can do things like:
from vehicles.car import engine
There is a file in the directories called car, which contains the class engine. Clear.
Now I am studying the possibility of storing a class in a file. So I can do something like:
from filters import air
and the air class is a file in itself. However, it is not clear to me how I can have a class called air, which is stored in its own file called air.py
If filter.py contains all my classes, then this import will work, but that is not what I want.
Any hints or pointers?
jay_t source
share