title: Importing classes in python returns cannot import name error
body: <p>I'm starting out with my very first python project but I'm running into a problem right from the start. I'm trying to figure out how to import a class into my main.py file.</p>
  
  <p>My directory structure is...</p>
  
  <pre><code>game
  - __init__.py
  - main.py
  - player.py
  </code></pre>
  
  <p>So far I have in <strong>main.py</strong>...</p>
  
  <pre><code>from player import Player
  
  player1 = Player("Ben")
  print player1.name
  </code></pre>
  
  <p>I get the following error...</p>
  
  <blockquote>
    <p>Traceback (most recent call last):
         File "main.py", line 1, in 
          from player import Player
        ImportError: cannot import name Player</p>
  </blockquote>
  
  <p>I've had a google but can't find anything that works. Can someone help please?</p>
  
  <p>I'm using Python 2.7.10</p>
  
  <p><strong>Update</strong></p>
  
  <p>So my player.py contains</p>
  
  <pre><code>class Player:
      def __init__(self, name):
          self.name = name
  
      def name(self):
          return self.name
  </code></pre>
  
  <p>and my <strong>init</strong>.py file is empty</p>