Importing modules

Ben Suffolk (cm1bcbls@bs47c.staffs.ac.uk)
7 Feb 1995 11:01:22 GMT

I would like to know if there is a way in which I could do the following :-

x='fred'
import x

this should be the same as

import fred

I need to do this because I don't know what modules I need and what to load
then at runtime depending on what is happening in the program.

Thanks in advance.

ps please e-mail me the answer as well as posting here.

--

+------------------------------------+ | Ben Suffolk | +------------------------------------+ | Email B.Suffolk@bs47c.staffs.ac.uk | +------------------------------------+