title: Get data back from Jython scripts using JSR-223
body: <p>I am using Jython 2.5.1 with JSR-223 (i.e. javax.script package) and I expect the last line of the Python script to be returned. For example, after evaluating this script:</p>
  
  <pre><code>class Multiplier:
  
    def multiply(self, x, y):
      return x * y
  
  Multiplier().multiply(5, 7)
  </code></pre>
  
  <p>I should get back 35, but I get null instead. In other hand it works with this other test:</p>
  
  <pre><code>5 * 7
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Here's the Java code:</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      ScriptEngine engine = new ScriptEngineManager().getEngineByName("python");
  
      FileReader f = new FileReader("Multiplier.py");
      Object result = engine.eval(f);
      //assert(result == 35);
  }
  </code></pre>
  
  <p>PS: It works fine with JRuby, Groovy and Rhino, i.e. the last line is always returned.</p>
  
  <p>Thanks in advance.</p>