Python : ImportError: cannot import name callfunc
<p>I'm Python newbie, and I have a problem with an error message </p>

<p>'ImportError: cannot import name callfunc'</p>

<p>I made two python files, '<code>~/a.py</code>' and '<code>~/pkg/b.py</code>'. (Additionally my IDE automatically created '<code>~/__init__.py</code>' and '<code>~/pkg/__init__.py</code>')</p>

<p>in a.py, a function </p>

<pre><code>def callfunc():
    print "Called"
</code></pre>

<p>is defined, and there are two statements in pkg/b.py:</p>

<pre><code>from a import callfunc
callfunc()
</code></pre>

<p>However when executing python pkg/b.py, an error raises : </p>

<pre><code>ImportError: cannot import name callfunc
</code></pre>

<p>I tried export PYTHONPATH=... , but it isn't effective also</p>

<p>How can I solve this problem?</p>
