coding style - How should I structure my classes and files in python? -


my code in 1 big file:

# file 1: ./mainfile.py class namespace:     class this:         ...     class that:         ...  mainfunc(namespace.this(), namespace.that()) 

i code this:

# file 1: ./namespace/this.py class this:     ...  # file 2: ./namespace/that.py class that:     ...  # file 3: ./mainfile.py import ??? mainfunc(namespace.this(), namespace.that()) 

what changes have make can still use same call mainfunc()?

you need make package. see the documentation.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -