title: Python Exit From Script and Return to Main
body: <p>I'm trying to make a simple text based game to improve my knowledge with Python, and I've created a little fighting system that's located in another Python file.  The way I go about calling this system is by importing the file and then calling the start function.  The problem I'm running into is actually getting the script to stop and return to the main script so the player can continue the game.  Here's the relevant code so far:</p>
  
  <p><strong>Fight.py</strong></p>
  
  <pre><code>def fight():
      global enemy_health
      global enemy
  
      if health &lt;= 0:
          print "You have died!"
          return False
      elif enemy_health &lt;= 0:
          print "You have killed the %s!" % enemy
          return True
  
      print "You have %d health." % health
      print "The enemy has %d health." % enemy_health
  
      while True:
          choice = raw_input("&gt; ")
          if choice == "stab":
              pDamage = random.randrange(2, 4)
              enemy_health -= pDamage
              print "You stab the %s and deal %d damage!" % (enemy, pDamage)
              enemyTurn()
          elif choice == "slash":
              pDamage = random.randrange(1, 6)
              enemy_health -= pDamage
              print "You slash the %s and deal %d damage!" % (enemy, pDamage)
              enemyTurn()
          elif choice == "chop":
              pDamage = random.randrange(2, 7)
              enemy_health -= pDamage
              print "You chop the %s and deal %d damage!" % (enemy, pDamage)
              enemyTurn()
          else:
              print "You can slash, stab, or chop the enemy!"
  </code></pre>
  
  <p><strong>Game.py</strong></p>
  
  <pre><code>elif command == "look":
      fight.start()
      fightResults = fight.fight()
      if fightResults == True:
          print "You've won the game!"
      elif fightResults == False:
          print "You've lost the game!"
          exit(0)
  </code></pre>
  
  <p>So, the problem is that when the player wins or loses and Fight.py returns a value, the entire game exits.  Any help fixing this problem would be greatly appreciated.  Thanks in advance!</p>