2009/12/23 holger krekel <hol...@merlinux.eu>: > thanks, i see. I think you could as well just do it once in a conftest.py > file > and avoid the dynamic discovery. The Python import system caches imports so > all > subsequent modules importing "scripy" would pick up the previously imported > one. You've reason; it works well from conftest.py file. Now I changed it to avoid the discovery:
------------------ def import_local(source='lib'): """Inserts local library on 'sys.path'.""" current_dir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(os.path.dirname(current_dir), source)) ------------------ _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev