I have a directory that stores all the .py files.
bin/
main.py
user.py # where class User resides
dir.py # where class Dir resides
Python 3
Same directory
.
import file:log.py
import class: SampleApp()
.
import log
if __name__ == "__main__":
app = log.SampleApp()
app.mainloop()
or
directory is basic
.
import in file: log.py
.
import class: SampleApp()
.
from basic import log
if __name__ == "__main__":
app = log.SampleApp()
app.mainloop()