title: How to get contents of file in Sublime Text 3 Python API
body: <p>I'm very new to Python and Sublime Text API dev... so this may be easy?</p>
  
  <p>I want to display the contents of a file (that sits next to the currently open file) to a new panel window. </p>
  
  <p>I can create a new panel no problem and get it to display a string using </p>
  
  <pre><code>def newLogWindow(self, output):
      window = self.view.window()
  
      new_view = window.create_output_panel("log")
      new_view.run_command('erase_view')
      new_view.run_command('append', {'characters': output})
      window.run_command("show_panel", {"panel": "output.log"})
  
      sublime.status_message('Metalang')
  
  pass
  </code></pre>
  
  <p>But what I need is a function to get contents of file to pass to that function.</p>
  
  <pre><code>content = xxxx.open_file("filename.txt")
  // somehow get contents of this file?
  // pass it to log window
  self.newLogWindow(content);
  </code></pre>
  
  <p>Thanks for your help!</p>