"dynamical" importing
Laurent Rahuel
lrahuel.notgood at voila.fr
Wed Oct 19 04:40:41 EDT 2005
More information about the Python-list mailing list
Wed Oct 19 04:40:41 EDT 2005
- Previous message (by thread): "dynamical" importing
- Next message (by thread): "dynamical" importing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I guess you need to look at __import__ Regards, Laurent. Joerg Schuster wrote: > Hello, > > I need to import modules from user defined paths. I.e. I want to do > something > like: > > module_dir = sys.argv[1] > > my_path = os.path.join(module_dir, 'bin', 'my_module') > > from my_path import my_object > > Obviously, it doesn't work this way. How would it work? > > Jörg Schuster
- Previous message (by thread): "dynamical" importing
- Next message (by thread): "dynamical" importing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list