title: Reading text file is only returning first line
body: <p>I'm trying to create a program that asks a user how many lines of the text file they want to see. I need to make it so if the user enters more than the number of lines, then I have in the file that it prints out the entire file. </p>
  
  <p>Below is the code I have so far but the problem I am currently having is it only prints out the first line of the text no matter what number I enter. </p>
  
  <p>Using Python 3.4:</p>
  
  <pre><code>def readFile(): 
      """retrieve the file my_data.txt"""
      try:
          textFile = open("my_data.txt","r")
          return textFile
      except:
          print("The file does not exist")
          return
  
  def readLines():    
      textFile = open("my_data.txt","r")  
      file_lines = textFile.readline()        
      print(file_lines)
  
  #main
  while True:
      cmd = int(input("\nEnter the number of lines you would like to read: "))    
      readLines()
  </code></pre>