title: Tornado: How to render response template from String?
body: <p>For my request handler, my template is defined as string, not a file. I tried rendering with this, but received this error:</p>
  
  <blockquote>
    <p>File "c:\envs\pomo\lib\site-packages\tornado\template.py", line 365,
    in _create_template
        f = open(path, "rb")</p>
  </blockquote>
  
  <pre><code>SESSIONS_TEMPLATE = template.Template('''&lt;html&gt;&lt;body&gt;
  
  {{sessions}}    
  &lt;/body&gt;&lt;/html&gt;
  ''')
  
  class MyHandler(tornado.web.RequestHandler):
      def get(self):        
          self.render(SESSIONS_TEMPLATE.generate(sessions=response))
  </code></pre>