In message <[EMAIL PROTECTED]>, Torsten Bronger wrote: > So I'd like to know a means to tell *explicitly* what I want to > import. Maybe I could use the imp module but that's ugly.
That seems to be the standard Python-provided way to explicitly import the file you want from the place you want. > I mean, there are hundreds of modules on my harddisk, so trying to avoid > nameclashs should not be the solution... That is what namespace qualifiers are for, e.g. import my_custom_stuff.parser versus import parser > John Machin writes: > >> 2. Failure to RTFabulousM: >> """ >> Details of the module searching and loading process are >> implementation and platform specific. It generally involves >> searching for a ``built- in'' module with the given name and then >> searching a list of locations given as sys.path. >> """ > > ... the whole systems seems largely arbitrary, which I don't > believe. ;-) The documentation <http://docs.python.org/lib/module-sys.html> says quite clearly that the search order is controlled by sys.path. So why not manipulate that to get the effect you want? > "parser" is built-in on Windows but not on Linux. It is standard on all platforms <http://docs.python.org/lib/module-parser.html>. -- http://mail.python.org/mailman/listinfo/python-list