This works in Python2.7 and Python3.5. Python2 __import__ searches relative and absolute paths by default. Python3 searches only absolute paths as default. The option change searches 1 parent directory relative to the calling function and has the same meaning in Python2 and Python3. --- rtemstoolkit/host.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rtemstoolkit/host.py b/rtemstoolkit/host.py index bae56b6..bc75394 100644 --- a/rtemstoolkit/host.py +++ b/rtemstoolkit/host.py @@ -84,7 +84,7 @@ def _load(): #except: # raise error.general('failed to load %s host support' % (name)) - platform = __import__(name, globals(), locals(), ['.', '']) + platform = __import__(name, globals(), locals(), ['.', ''], 1) if platform is None: raise error.general('failed to load %s host support' % (name)) -- 2.7.4 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel