title: How to call a javascript function from tornado web <python>?
body: <p>I want to make a live chart with smoothy js.
  My server is running from tornado, this is written in python.
  Smoothy can refresh the chart live. In python I render the html file, which includes the smoothy, but I don't know how to refresh data from python (because my datas in SQL database)
  There is the function called from <strong>html</strong> file: (call it ex.html)</p>
  
  <pre><code>  var line1 = new TimeSeries();
    var line2 = new TimeSeries();
    var i = 1;
    setInterval(function() {
      line1.append(new Date().getTime(), Math.random);
      line2.append(new Date().getTime(), Math.random());
    }, 1000);
  </code></pre>
  
  <p>As you see the append method updates my chart, and the second parameter is the value(x axis). So my question is:
  How to add information from tornado web using smoothie?</p>
  
  <p>And there is my python code:</p>
  
  <pre><code>class MainHandler(tornado.web.RequestHandler):
      def get(self):
          self.render("ex.html")
  
  def make_app():
      return tornado.web.Application([
          (r"/", MainHandler),
      ])
  
  if __name__ == "__main__":
      app = make_app()
      app.listen(8888)
      tornado.ioloop.IOLoop.current().start()
  </code></pre>
  
  <p>If my description isn't understandable, please drop me a message.
  Thanks for the answer!</p>