I have very large file which contains multiple classes and want to break them up with each class getting its own file. I also have a file to interface with those classes:
You can give each of your classes a file, and then add them all to a package.
For example you have
c.py each with classes
C respectively. You can package all these classes into a single package
abc by moving the files
c.py into a single folder,
abcp and creating an
__init__.py file may contain something like
from .a import A from .b import B from .c import C
so that it would be possible to directly access the classes from the package.
For example, in
main.py you can do something like
import abcp if __name__ == '__main__': oa = abc.A()