Simon Brunning wrote: > On 5/26/05, Andy Leszczynski > <[EMAIL PROTECTED]> wrote: > >>I have a program which is going to dynamicly load components from some >>arbitrary defined paths. How to do that? > > > You can locate them with os.walk and fnmatch. Then you can temporarily > add the directory to sys,path, and import using __import__().
And if you do that, note the difference between adding your temporary directories at the start of sys.path and at the end of it... (this is critical to understand if any of the dynamically loaded module names might collide with names of any other packages in your sys.path, including standard module names). -Peter -- http://mail.python.org/mailman/listinfo/python-list