title: Why a function of python class is called twice
body: <p>I am having a problem with the function of python class that is called twice.
  I am using Spyder IDE.</p>
  
  <p>Here is my simple code</p>
  
  <pre><code>class Test:
      def f(self):
          print("a")
  
  
  from Test import *
  t = Test()
  t.f()
  </code></pre>
  
  <p>When I press "Run File" button...the result is</p>
  
  <pre><code>a
  a
  </code></pre>
  
  <p>But when I try to highlight everything and press "Run Cell"...the result is</p>
  
  <pre><code>a
  </code></pre>
  
  <p>I would like to know what happen when I press "Run File" and how to solve this issue.</p>
  
  <p>Many thanks </p>