title: Reading big data file in python 3
body: <p>I am new in python. I have got a <code>.f06</code> file (nastran output file) and its size approximately 1gb and has got 8m lines. Notepad++ and Textpad cannot open this files. I want to develop a GUI which open type of this files and shows it in a text edit widget. But this operation takes very long time and this situation is not useful for me.</p>
  
  <p>Following part you can see my code.</p>
  
  <p>The text edit widget object name is txtf06.</p>
  
  <p>The form object name is form.</p>
  
  <p>I have two specific boundaries which are 'Grid point force'  and 'MSC.NASTRAN job CREATED'. I want to write all lines between these two boundaries into my text edit widget. It will have approximately 4m lines.</p>
  
  <pre><code>def btnImportClickEvent():
      import re
      fileName = form.tbPath.text(): #.f06 path
      file = open(fileName,'r')
  
      startFilter = "GRID POINT FORCE" #start point
      endFilter = "MSC.NASTRAN JOB CREATED" #end point
  
      startRegex = re.compile(startFilter, re.DOTALL)
      endRegex = re.compile(endFilter; re.DOTALL)
  
      status = True
  
      for i in file:
          searchObj = startRegex.searc(i)
          if searchObj:
          while (status==True):
              form.txtf06.append(file.readline())
              searchObj = endRegex.search(i)
              if searchObj:
                  break
          break
      file.close()
  </code></pre>