title: Cant get __import__() to dynamically import a module in python - I know this cause it doesn't show up in sys.modules
body: <p>I wrote a small script. It's designed to search the python directory for all available modules (whether they are installed or not), then it is supposed to check what modules are currently loaded, then it offers an option to dynamically load a module of your choice. The latter using <code>__import__()</code> because I am passing a string to it - (this is where I am having a problem - but I'll get back to it shortly)...then it gives the option to "browse" the module for all its classes, functions, etc. (using <code>dir([module name])</code> ...).</p>
  
  <p><strong>The problem:</strong></p>
  
  <p>When the module is loaded dynamically - it is embedded in a <code>try/except</code> statement - if it succeeds it reports that the "module is loaded" and if it fails it reports...duh..."Failed to load..."</p>
  
  <p>If you type the name of a module, for example a module named "uu", it says "loaded".  So I know it is loading - however, when I go back and call the function that checks all of the LOADED modules - it is blank (using <code>sys.modules</code>)</p>
  
  <p>I am thinking that python is loading the module into a temporary place which is not <code>sys.modules</code> because when I exit out of the script and check <code>sys.modules</code> it is not there.</p>