title: Make python reload() function read from .py instead of .pyc
body: <p>I have written a rather large module which is automatically compiled into a .pyc file when I import it. </p>
  
  <p>When I want to test features of the module in the interpreter, e.g., class methods, I use the <code>reload()</code> function from the <code>imp</code> package.</p>
  
  <p>The problem is that it reloads the <code>.pyc</code> file, not the <code>.py</code> file.</p>
  
  <p>For example I try a function in the interpreter, figure out that it is not working properly, I would make changes to the <code>.py</code> file. However, if I reload the module in the interpreter, it reloads the <code>.pyc</code> file so that the changes are not reflected in the interpreter. I would have to quit the interpreter, start it again and use <code>import</code> to load the module (and create the <code>.pyc</code> file from the <code>.py</code> file). Or alternatively I would have to delete the <code>.pyc</code> file each time.</p>
  
  <p>Is there any better way? E.g., to make <code>reload()</code> prefer <code>.py</code> files over <code>.pyc</code> files?</p>
  
  <p>Here is an except from the interpreter session that shows that <code>reload()</code> loads the <code>.pyc</code> file.</p>
  
  <pre><code>&gt;&gt;&gt; reload(pdb)
  &lt;module 'pdb' from 'pdb.pyc'&gt;
  </code></pre>
  
  <p>EDIT:
  And even if I delete the <code>.pyc</code> file, another <code>.pyc</code> file will be created each time I use reload, so that I have to delete the <code>.pyc</code> file each time I use reload. </p>
  
  <pre><code>&gt;&gt;&gt; reload(pdb)
  &lt;module 'pdb' from 'pdb.py'&gt;
  &gt;&gt;&gt; reload(pdb)
  &lt;module 'pdb' from 'pdb.pyc'&gt;
  </code></pre>