> This should work:
> def get_obj():
> tmp = load_package_strict("tmp", basedir)
> return tmp.main.TTT()
Thank you:)
I can only mention that it is working only if __init__.py of pkg contains line:
import main
To avoid modules caching I copy package to the new folder with anot
On 11/12/2013 5:28 PM, Sergey wrote:
def get_obj():
pkg = load_package_strict("tmp", basedir)
from tmp import main
return main.TTT()
It is working, but if package code changes on disc at runtime and I call
get_obj again, it returns instance of class, loaded for the first time
previous
On Tue, 10 Dec 2013 23:28:31 -0800 (PST), Sergey
wrote:
def get_obj():
pkg = load_package_strict("tmp", basedir)
from tmp import main
return main.TTT()
It is working, but if package code changes on disc at runtime and I
call get_obj again, it returns instance of class, loaded for the