title: importlib.reload module from string?
body: <p>I want to use <code>importlib</code> to reload a module whose name is dynamically generated.</p>
  
  <p>Example:</p>
  
  <pre><code>import sys
  
  def some_func():
      return "sys"
  
  want_reload = some_func()
  </code></pre>
  
  <p>Now how do I reload the module <code>sys</code> using the variable <code>want_reload</code>? I can't supply it directly to <code>importlib.reload()</code> because it says it expects a module, not str.</p>
  
  <p>It would be better if an invalid string, or a module that's not loaded, is supplied, e.g. <code>"........"</code>, that it raises an exception.</p>