title: Rinex formatting in Python. Looping problems
body: <p>I'm a Python novice and I have an issue trying to format RINEX (satellite navigation data, like GPS), so that I end up with an ASCII file with three columns (GPS time; satellite ID; signal types (several sub-columns)), that ultimately would be manipulated to yield signal delay errors.
  I'm currently trying to progress through my code by checking the output at various stages of the script, therefore there's an abundance of print statements scattered everywhere. The main body of my code is:</p>
  
  <pre><code>def remove_header(self):
          #Grab header and discard
          for count, self.line in enumerate(self.rinexFile, 1):
              if "END OF HEADER" in self.line:
                  self.header_number = count
                  eoh = self.line
                  self.end_header = eoh.strip()
                  print "%s at line %d." % (self.end_header, count)
                  self.container_1 = self.rinexFile[self.header_number:]
                  open('FALK1179.14o', 'w').writelines(self.container_1)
  
  
  def epoch_grabber(self):
          #Grab data
      self.rinexFile_one = open('FALK1179.14o', 'r+').readlines()
      for count, self.line_1 in enumerate(self.rinexFile_one, 0):
          #Grab epoch
          #self.raw_data = line.split()
          if " 14 " in self.line_1:
              self.epoch_data = self.line_1.split()
              self.index = datetime.strptime(' '.join(self.epoch_data[0:6]), '%y %m %d %H %M %S.%f0')
          else:
              pass
  
  
  def satellite_number_and_id(self):
       #Identify number of satellites in each epoch block
       satNum_init = self.epoch_data[7]
       satNum_temp = satNum_init[0:2]
       if satNum_temp.find("G") == 1:
           self.satNum = satNum_temp.replace("G", "")
           self.satNum = int(self.satNum)
       else:
           self.satNum = satNum_temp
           self.satNum = int(self.satNum)
  
       #List the SVIDs of each satellite
       satNum_init_tem = satNum_init[2:]
       satId_temp = satNum_init_tem.split("G")
       self.sat_Id = filter(None, satId_temp)
  
  def satData_package(self):
      #Looping through for every satellite and create dummy frame
      data = {}
      for line in self.container_1:
          line = line.strip()
          if not line: continue
  
          if line.startswith(" 14 "):
              if line not in data: data[line] = []
              epoch_line = line
              continue
  
          self.satData = data[epoch_line].append(line)
          print "satData: %s" % (self.satData)
  </code></pre>
  
  <p>The encountering an issue with the looping, as seen in the epoch_grabber function. My print statements yield the same end epoch, over and over, instead of beginning at the first epoch, say: Epoch: 2014-04-27 00:00:30, Epoch: 2014-04-27 00:01:00, Epoch: 2014-04-27 00:01:30, and so on. Instead it just loops: Epoch: 2014-04-27 23:59:30, Epoch: 2014-04-27 23:59:30, Epoch: 2014-04-27 23:59:30.</p>
  
  <p>The intention is to have the epoch, then all subsequent satellites' signals packed together, then the next "block" where the next epoch begins. Each epoch has an interval of 30seconds. Then the block should be split further to yield individual satellite files, that each contain the epoch in one column, and signals in the remainder. </p>
  
  <p>Any advice welcome</p>