On Tue, 10 Dec 2013 23:28:31 -0800 (PST), Sergey <sh0...@gmail.com> 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 previously. That's how import works. Once something has been imported, the module information is cached. There are three ways to defeat that, but they're all risky.


How to replace line "from tmp import main" by getting properties of
pkg?

No clue what you mean by that.

--
DaveA

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to