Aug-23-2022, 11:39 AM
(Aug-23-2022, 01:47 AM)rob101 Wrote: Well, that should beYes that should be right.from model import util
andfrom model.hr import hr
I think.
Kjaglewicz is do it like this easier to see the structure.
secure-erp\ controller\ |-- hr_controller.py |-- main_controller.py model\ |-- util.py hr\ |-- hr.py
A quick test.
util.py
def util_func(): print('util func')
hr.py
def hr_func(): print('hr stuff')
(secure-erp) G:\div_code\secure-erp λ ptpython >>> from model import util >>> >>> util.util_func() util func >>> >>> from model.hr import hr >>> >>> hr.hr_func() hr stuff >>>I usually make virtual envirmont then there is no OS Path problems.
Also install ptpython then get autocomplete when try out imports,then can see earlier what it find or not.