Python: Importing Module
<p>Lets say i have a python model fibo.py defined as below:</p>

<pre><code>#Fibonacci numbers module
print "This is a statement"
def fib(n):
    a,b = 0,1
    while b &lt; n:
        print b
        a, b = b, a+b

def fib2(n):
    a,b = 0,1
    result= []
    while(b &lt; n):
        result.append(b)
        a, b = b, a+b
    return result
</code></pre>

<p>In my interpreter session, I do the following:</p>

<pre><code>&gt;&gt; import fibo
This is a statement
&gt;&gt;&gt; fibo.fib(10)
1
1
2
3
5
8

&gt;&gt;&gt; fibo.fib2(10)
[1, 1, 2, 3, 5, 8]
&gt;&gt;&gt; fibo.__name__
'fibo'
&gt;&gt;&gt; 
</code></pre>

<p>So far so good..restart the interpreter:</p>

<pre><code>&gt;&gt;&gt; from fibo import fib,fib2
This is a statement
&gt;&gt;&gt; fibo.__name__
Traceback (most recent call last):
File "&lt;stdin&gt;", line 1, in &lt;module&gt;
NameError: name 'fibo' is not defined
&gt;&gt;&gt;
</code></pre>

<p>I expected the error as I have only imported fib and fib2. But I don't understand why the statement was printed when I only imported fib and fib2.</p>

<p>Secondly if I change the module as:</p>

<pre><code>#Fibonacci numbers module
print "This is a statement"
print __name__
</code></pre>

<p>What should be the expected result?</p>
