title: How do I reload a module after changing it?
body: <p>Python Console with Python 3.4.2 </p>
  
  <p>I defined a function in a module which runs correctly in Python Console in PyCharm Community Edition 4.5.4:<br>
  ReloadTest.py:</p>
  
  <pre><code>def reloadtest(x):
      print("Version A: {}".format(x))
  </code></pre>
  
  <p>Python Console:</p>
  
  <pre><code>Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32
  &gt;&gt;&gt; from ReloadTest import reloadtest
  &gt;&gt;&gt; reloadtest(1)
  Version A: 1   
  </code></pre>
  
  <p>After I modified the function to "Version B", PyCharm can't find the change, and <code>importlib.reload(ReloadTest)</code> gives me error.<br>
  I must reload the Python Console or restart PyCharm every time I modify a module. What did I do wrong? What is the best way to handle this?</p>
  
  <p>ReloadTest.py:</p>
  
  <pre><code>def reloadtest(x):
      print("Version B: {}".format(x))
  </code></pre>
  
  <p>Python Console:</p>
  
  <pre><code>&gt;&gt;&gt; reloadtest(1)
  Version A: 1
  &gt;&gt;&gt; from ReloadTest import reloadtest
  &gt;&gt;&gt; reloadtest(1)
  Version A: 1
  &gt;&gt;&gt; import importlib
  &gt;&gt;&gt; importlib.reload(ReloadTest)
  Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
  NameError: name 'ReloadTest' is not defined
  &gt;&gt;&gt; from ReloadTest import reloadtest
  &gt;&gt;&gt; reloadtest(1)
  Version A: 1
  &gt;&gt;&gt; import ReloadTest
  &gt;&gt;&gt; reloadtest(1)
  Version A: 1
  </code></pre>