title: Am I incorrectly importing my module?
body: <p>I've been working my way through <a href="http://learnpythonthehardway.org/book/ex45.html" rel="nofollow">Learn Python the Hard Way</a>, and am currently in the section where you have to code your own text-based game. I took the code from the game provided by the author and "abstracted" it until I got a sort of template I could import into the file for my own game. I want to use the classes and methods from the template module and simply provide the details that are specific to my game. This way, I don't have to rewrite everything that's in the template. The template I'm using looks like this:</p>
  
  <pre><code>""" This module provides some classes for constructing an interactive,
  text-based game. You should ideally subclass what's provided here, and
  override methods or provide new methods as you see fit.
  """
  from sys import exit
  from random import randint
  
  # TODO: keep Scene class and Map class here, move everything else outside and just import (?)
  # TODO: move dialogs to text files (?)
  # TODO: remove 'random' import, 'sys' probably needs to stay
  
  class Scene(object):
      """ A basic class describing a scene in your game. You should subclass this and implement your own version of enter(). """
      def enter(self):
          """ Play out the scene and return a string key referring to the next scene."""
          print "This scene is not yet configured. Subclass it and implement enter()."
          exit(1)
  
  class Engine(object):
      """ The main engine that runs the actual game. This is where scenes are
      stepped through. You could add a system to change the starting point of
      your game depending on a save state, etc.
      """
  
      # initialize the engine with a map of scenes
      def __init__(self, scene_map):
          """ Initialize the engine with a map of all scenes in your game. """
          self.scene_map = scene_map
  
      def play(self):
          """ Start the game with the map set at the opening scene.
          Also grab the final scene of your game. Continue through the game
          as long as you aren't at the final scene. Then, make sure you
          actually play the final scene.
          """
          # current_scene is the results of scene_map's opening_scene()
          current_scene = self.scene_map.opening_scene()
  
          # last_scene is grabbing the next scene, with param of 'finished'
          last_scene = self.scene_map.next_scene('scene')
  
          # while you're not on the final scene/room
          while current_scene != last_scene:
              next_scene_name = current_scene.enter()
              current_scene = self.scene_map.next_scene(next_scene_name)
  
          # be sure to print out the last scene
          current_scene.enter()
  
  
  # TODO: abstract this class
  class Map(object):
      """ Essentially holds all the scenes for your game and provides methods for grabbing the opening scene and next scene.
      Subclass this and provide your own scenes.
      """
      #scenes = {"scene": Scene()}
  
      def __init__(self, start_scene, scenes={"scene": Scene()}):
          # set the dictionary of scenes
          self.scenes = scenes
          """ Initialize the map with whatever your starting scene is. """
          self.start_scene = start_scene
  
      def next_scene(self, scene_name):
          """ Get the value of scene_name and return it. """
          val = self.scenes.get(scene_name)
          return val
  
      def opening_scene(self):
          """ Return the scene your game will start with. """
          return self.next_scene(self.start_scene)
  
  a_map = Map('scene')
  a_game = Engine(a_map)
  a_game.play()
  </code></pre>
  
  <p>and my own game file looks like this:</p>
  
  <pre><code>from sys import exit
  from random import randint
  from game_template import *
  
  scenes = {
          "RudeWakeUp": RudeWakeUp(),
          "Fridge": Fridge(),
          "PlugFix": PlugFix(),
          "PlumbingFix": PlumbingFix(),
          "FridgeRelocation": FridgeRelocation(),
          "Final": Final(),
          "Fail": Fail()
          }
  class Fail(Scene):
      def enter(self):
          print "Well, it looks like the fridge is staying right where it is."
          exit(1)
  
  class RudeWakeUp(Scene):
      pass
  
  class Fridge(Scene):
      pass
  
  class PlugFix(Scene):
      pass
  
  class PlumbingFix(Scene):
      pass
  
  class FridgeRelocation(Scene):
      pass
  
  class Final(Scene):
      pass
  
  # TEST AREA
  game_map = Map('Fail', scenes)
  game = Engine(game_map)
  game.play()
  </code></pre>
  
  <p>I'm currently only testing <code>Fail()</code>. The problem is that when I execute my game file, I get the output from the Scene() base class in the template instead of from <code>Fail()</code>. Is this because I'm importing incorrectly, inheriting incorrectly, or something else? I've done programming in python before, but it's been a while since I've made anything significant with it and I may have forgotten some things about how classes work. Any assistance would be appreciated.</p>