sparkes wrote: > exec 'import ' + <variable> + ' as my_mod' Eek. Don't do that. foo = __import__('foo') Much neater. The exec() function is an evil sin. Any time you think of using it, there's likely to be a better way :) Aq.