|
From: Christian B. <chr...@zy...> - 2010-11-02 17:04:43
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi there,
TL;DR: Calling methods from an embedded Jython script does nothing when
using JSR-223 and Jython 2.5.1, while Jython 2.2.1 just works fine.
[Disclaimer: This is my first post on this list, so please go easy on me
:-)]
I'm currently trying to switch to Jython 2.5.1 from 2.2.1 and I'm having
a real hard time getting it to work...
Naively, I would've thought that replacing jython.jar with a new one
from 2.5.1 and removing jython-script.jar would just work.
I'm using the JSR-223 interface to embed the scripting engine. By
itself, everything seems to work as expected and the same way as in
Jython 2.2.1 (apart from the newer language that is).
The only thing that is not working for me is implementing a Java
interface from Python and calling methods on it. I have created a small
test program for this:
- ------------- myscript/ScriptingTest.java -------------
package myscript;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class ScriptingTest {
public static void main(String[] args) {
try {
final ScriptEngineManager manager =
new ScriptEngineManager();
final ScriptEngine engine =
manager.getEngineByName("python");
final InputStream is =
ScriptingTest.class.getResourceAsStream(
"/myscript/myscript.py");
engine.eval(new InputStreamReader(is));
} catch (final Exception e) {
e.printStackTrace();
}
}
}
- ------------- myscript/PythonCallable.java -------------
package myscript;
public interface PythonCallable {
String getAString();
void callAVoid();
}
- ------------- myscript/myscript.py -------------
from myscript import PythonCallable as PythonCallable
class MyPythonCallable(PythonCallable):
def getAString(self):
return 'A string'
def callAVoid(self):
print 'Called a void method'
print 'getAString() returns: %s' % \
MyPythonCallable().getAString()
print 'callAVoid():'
MyPythonCallable().callAVoid()
- ------------------------------------------------
Using Jython 2.2.1, I get:
$ java -cp .:jython.jar:jython-engine.jar myscript.ScriptingTest
getAString() returns: A string
callAVoid():
Called a void method
This is just the way I would expect things to behave (OT: embedding
JavaScript and using a similiar script gives similiar output).
Using a Jython 2.5.1 JAR, as created by the installer (with the default
options), I get this instead:
$ java -cp .:jython.jar myscript.ScriptingTest
getAString() returns: None
callAVoid():
I also tried Jython 2.5.2 RC2 with the same result.
If it matters: my environment is Debian Linux 5.0 AMD64 with the Sun
Java 1.6 JVM, Windows seems to behave the same way.
Am I doing something fundamentally wrong? Is using JSR-223 this way
supported at all in Jython 2.5.1? If I missed relevant documentation,
can somebody point me in the right direction?
Cheers,
- --
Christian Blichmann
========================================================================
zynamics GmbH - Address: Grosse Beckstrasse 3, 44787 Bochum, Germany
- Phone: +49 (234) 6 87 07 86 - Fax: +49 (234) 57 00 02 00
- UstId: DE814229418 - Trade Register: HRB 9626
========================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJM0D6eAAoJEOF0gv4uh+kfP9IH/AzhqpssyjnEnKE8wZlIeg07
/0MmWLMFxaLaugypd01X/hEYMYP9OE1oK3IqOAeDhRzkktzZuImVa90+gfTXzXhT
3svAGOPlNhqs9I0V1O39/b/QSMfi4k7pkRYAuM8Ou70vWJunGnStoqMtvUrA3Tb8
0ho8LzBiRgBLsCI+WTF7J0zNg+qKzGF/UW6G8zoWIRLTNpGEDcboPnc1kZ7W7OY7
Bk8VmHVCDkziSFdu3oGsY7D2ZqG36xrv80jHnXv0+6BSdvJ6XfRnPc/ZLefyt2pG
uYvkjLDp7VWzyO6VSy1wFAQoybXsVupYQPGVk5UD4Y8+ShpAXCS3ew3YJcZAkNc=
=xBNK
-----END PGP SIGNATURE-----
|
|
From: Alex G. <ale...@ne...> - 2010-11-02 17:08:19
|
02.11.2010 18:38, Christian Blichmann kirjoitti:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
>
> TL;DR: Calling methods from an embedded Jython script does nothing when
> using JSR-223 and Jython 2.5.1, while Jython 2.2.1 just works fine.
>
Jython 2.5.1 has serious JSR-223 issues -- use 2.5.2rc2 instead. Come
back here if it still doesn't work.
> [Disclaimer: This is my first post on this list, so please go easy on me
> :-)]
>
> I'm currently trying to switch to Jython 2.5.1 from 2.2.1 and I'm having
> a real hard time getting it to work...
> Naively, I would've thought that replacing jython.jar with a new one
> from 2.5.1 and removing jython-script.jar would just work.
> I'm using the JSR-223 interface to embed the scripting engine. By
> itself, everything seems to work as expected and the same way as in
> Jython 2.2.1 (apart from the newer language that is).
> The only thing that is not working for me is implementing a Java
> interface from Python and calling methods on it. I have created a small
> test program for this:
>
> - ------------- myscript/ScriptingTest.java -------------
> package myscript;
>
> import java.io.InputStream;
> import java.io.InputStreamReader;
>
> import javax.script.ScriptEngine;
> import javax.script.ScriptEngineManager;
>
> public class ScriptingTest {
> public static void main(String[] args) {
> try {
> final ScriptEngineManager manager =
> new ScriptEngineManager();
> final ScriptEngine engine =
> manager.getEngineByName("python");
>
> final InputStream is =
> ScriptingTest.class.getResourceAsStream(
> "/myscript/myscript.py");
> engine.eval(new InputStreamReader(is));
> } catch (final Exception e) {
> e.printStackTrace();
> }
> }
> }
> - ------------- myscript/PythonCallable.java -------------
> package myscript;
>
> public interface PythonCallable {
> String getAString();
> void callAVoid();
> }
> - ------------- myscript/myscript.py -------------
> from myscript import PythonCallable as PythonCallable
>
> class MyPythonCallable(PythonCallable):
> def getAString(self):
> return 'A string'
>
> def callAVoid(self):
> print 'Called a void method'
>
> print 'getAString() returns: %s' % \
> MyPythonCallable().getAString()
> print 'callAVoid():'
> MyPythonCallable().callAVoid()
> - ------------------------------------------------
>
> Using Jython 2.2.1, I get:
> $ java -cp .:jython.jar:jython-engine.jar myscript.ScriptingTest
> getAString() returns: A string
> callAVoid():
> Called a void method
>
> This is just the way I would expect things to behave (OT: embedding
> JavaScript and using a similiar script gives similiar output).
>
> Using a Jython 2.5.1 JAR, as created by the installer (with the default
> options), I get this instead:
> $ java -cp .:jython.jar myscript.ScriptingTest
> getAString() returns: None
> callAVoid():
>
> I also tried Jython 2.5.2 RC2 with the same result.
>
> If it matters: my environment is Debian Linux 5.0 AMD64 with the Sun
> Java 1.6 JVM, Windows seems to behave the same way.
>
> Am I doing something fundamentally wrong? Is using JSR-223 this way
> supported at all in Jython 2.5.1? If I missed relevant documentation,
> can somebody point me in the right direction?
>
> Cheers,
>
> - --
> Christian Blichmann
>
> ========================================================================
> zynamics GmbH - Address: Grosse Beckstrasse 3, 44787 Bochum, Germany
> - Phone: +49 (234) 6 87 07 86 - Fax: +49 (234) 57 00 02 00
> - UstId: DE814229418 - Trade Register: HRB 9626
> ========================================================================
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJM0D6eAAoJEOF0gv4uh+kfP9IH/AzhqpssyjnEnKE8wZlIeg07
> /0MmWLMFxaLaugypd01X/hEYMYP9OE1oK3IqOAeDhRzkktzZuImVa90+gfTXzXhT
> 3svAGOPlNhqs9I0V1O39/b/QSMfi4k7pkRYAuM8Ou70vWJunGnStoqMtvUrA3Tb8
> 0ho8LzBiRgBLsCI+WTF7J0zNg+qKzGF/UW6G8zoWIRLTNpGEDcboPnc1kZ7W7OY7
> Bk8VmHVCDkziSFdu3oGsY7D2ZqG36xrv80jHnXv0+6BSdvJ6XfRnPc/ZLefyt2pG
> uYvkjLDp7VWzyO6VSy1wFAQoybXsVupYQPGVk5UD4Y8+ShpAXCS3ew3YJcZAkNc=
> =xBNK
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps& games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Jython-users mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/jython-users
|
|
From: Roland W. <r_w...@us...> - 2010-11-02 21:42:41
|
Am 02.11.2010 18:08, schrieb Alex Grönholm:
> 02.11.2010 18:38, Christian Blichmann kirjoitti:
> Hi there,
>
> TL;DR: Calling methods from an embedded Jython script does nothing when
> using JSR-223 and Jython 2.5.1, while Jython 2.2.1 just works fine.
>
>> Jython 2.5.1 has serious JSR-223 issues -- use 2.5.2rc2 instead. Come
>> back here if it still doesn't work.
You did not read the complete mail! He has just done this look further down!
> [Disclaimer: This is my first post on this list, so please go easy on me
> :-)]
>
> I'm currently trying to switch to Jython 2.5.1 from 2.2.1 and I'm having
> a real hard time getting it to work...
> Naively, I would've thought that replacing jython.jar with a new one
> from 2.5.1 and removing jython-script.jar would just work.
> I'm using the JSR-223 interface to embed the scripting engine. By
> itself, everything seems to work as expected and the same way as in
> Jython 2.2.1 (apart from the newer language that is).
> The only thing that is not working for me is implementing a Java
> interface from Python and calling methods on it. I have created a small
> test program for this:
>
> ------------- myscript/ScriptingTest.java -------------
> package myscript;
>
> import java.io.InputStream;
> import java.io.InputStreamReader;
>
> import javax.script.ScriptEngine;
> import javax.script.ScriptEngineManager;
>
> public class ScriptingTest {
> public static void main(String[] args) {
> try {
> final ScriptEngineManager manager =
> new ScriptEngineManager();
> final ScriptEngine engine =
> manager.getEngineByName("python");
>
> final InputStream is =
> ScriptingTest.class.getResourceAsStream(
> "/myscript/myscript.py");
> engine.eval(new InputStreamReader(is));
> } catch (final Exception e) {
> e.printStackTrace();
> }
> }
> }
> ------------- myscript/PythonCallable.java -------------
> package myscript;
>
> public interface PythonCallable {
> String getAString();
> void callAVoid();
> }
> ------------- myscript/myscript.py -------------
> from myscript import PythonCallable as PythonCallable
>
> class MyPythonCallable(PythonCallable):
> def getAString(self):
> return 'A string'
>
> def callAVoid(self):
> print 'Called a void method'
>
> print 'getAString() returns: %s' % \
> MyPythonCallable().getAString()
> print 'callAVoid():'
> MyPythonCallable().callAVoid()
> ------------------------------------------------
>
> Using Jython 2.2.1, I get:
> $ java -cp .:jython.jar:jython-engine.jar myscript.ScriptingTest
> getAString() returns: A string
> callAVoid():
> Called a void method
>
> This is just the way I would expect things to behave (OT: embedding
> JavaScript and using a similiar script gives similiar output).
>
> Using a Jython 2.5.1 JAR, as created by the installer (with the default
> options), I get this instead:
> $ java -cp .:jython.jar myscript.ScriptingTest
> getAString() returns: None
> callAVoid():
>
> I also tried Jython 2.5.2 RC2 with the same result.
>
> If it matters: my environment is Debian Linux 5.0 AMD64 with the Sun
> Java 1.6 JVM, Windows seems to behave the same way.
>
> Am I doing something fundamentally wrong? Is using JSR-223 this way
> supported at all in Jython 2.5.1? If I missed relevant documentation,
> can somebody point me in the right direction?
>
> Cheers,
>
>>
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps& games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Jython-users mailing list
Jyt...@li...
https://lists.sourceforge.net/lists/listinfo/jython-users
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Jython-users mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/jython-users
|
|
From: Alex G. <ale...@ne...> - 2010-11-02 21:46:26
|
02.11.2010 23:24, Roland Walter kirjoitti:
> Am 02.11.2010 18:08, schrieb Alex Grönholm:
>> 02.11.2010 18:38, Christian Blichmann kirjoitti:
>> Hi there,
>>
>> TL;DR: Calling methods from an embedded Jython script does nothing when
>> using JSR-223 and Jython 2.5.1, while Jython 2.2.1 just works fine.
>>
>>> Jython 2.5.1 has serious JSR-223 issues -- use 2.5.2rc2 instead. Come
>>> back here if it still doesn't work.
> You did not read the complete mail! He has just done this look further down!
Oops...sorry :(
I'll try running those and see if I can figure anything out.
>> [Disclaimer: This is my first post on this list, so please go easy on me
>> :-)]
>>
>> I'm currently trying to switch to Jython 2.5.1 from 2.2.1 and I'm having
>> a real hard time getting it to work...
>> Naively, I would've thought that replacing jython.jar with a new one
>> from 2.5.1 and removing jython-script.jar would just work.
>> I'm using the JSR-223 interface to embed the scripting engine. By
>> itself, everything seems to work as expected and the same way as in
>> Jython 2.2.1 (apart from the newer language that is).
>> The only thing that is not working for me is implementing a Java
>> interface from Python and calling methods on it. I have created a small
>> test program for this:
>>
>> ------------- myscript/ScriptingTest.java -------------
>> package myscript;
>>
>> import java.io.InputStream;
>> import java.io.InputStreamReader;
>>
>> import javax.script.ScriptEngine;
>> import javax.script.ScriptEngineManager;
>>
>> public class ScriptingTest {
>> public static void main(String[] args) {
>> try {
>> final ScriptEngineManager manager =
>> new ScriptEngineManager();
>> final ScriptEngine engine =
>> manager.getEngineByName("python");
>>
>> final InputStream is =
>> ScriptingTest.class.getResourceAsStream(
>> "/myscript/myscript.py");
>> engine.eval(new InputStreamReader(is));
>> } catch (final Exception e) {
>> e.printStackTrace();
>> }
>> }
>> }
>> ------------- myscript/PythonCallable.java -------------
>> package myscript;
>>
>> public interface PythonCallable {
>> String getAString();
>> void callAVoid();
>> }
>> ------------- myscript/myscript.py -------------
>> from myscript import PythonCallable as PythonCallable
>>
>> class MyPythonCallable(PythonCallable):
>> def getAString(self):
>> return 'A string'
>>
>> def callAVoid(self):
>> print 'Called a void method'
>>
>> print 'getAString() returns: %s' % \
>> MyPythonCallable().getAString()
>> print 'callAVoid():'
>> MyPythonCallable().callAVoid()
>> ------------------------------------------------
>>
>> Using Jython 2.2.1, I get:
>> $ java -cp .:jython.jar:jython-engine.jar myscript.ScriptingTest
>> getAString() returns: A string
>> callAVoid():
>> Called a void method
>>
>> This is just the way I would expect things to behave (OT: embedding
>> JavaScript and using a similiar script gives similiar output).
>>
>> Using a Jython 2.5.1 JAR, as created by the installer (with the default
>> options), I get this instead:
>> $ java -cp .:jython.jar myscript.ScriptingTest
>> getAString() returns: None
>> callAVoid():
>>
>> I also tried Jython 2.5.2 RC2 with the same result.
>>
>> If it matters: my environment is Debian Linux 5.0 AMD64 with the Sun
>> Java 1.6 JVM, Windows seems to behave the same way.
>>
>> Am I doing something fundamentally wrong? Is using JSR-223 this way
>> supported at all in Jython 2.5.1? If I missed relevant documentation,
>> can somebody point me in the right direction?
>>
>> Cheers,
>>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps& games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Jython-users mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/jython-users
>
>> ------------------------------------------------------------------------------
>> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
>> Create new apps& games for the Nokia N8 for consumers in U.S. and Canada
>> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
>> http://p.sf.net/sfu/nokia-dev2dev
>> _______________________________________________
>> Jython-users mailing list
>> Jyt...@li...
>> https://lists.sourceforge.net/lists/listinfo/jython-users
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps& games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Jython-users mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/jython-users
|
|
From: Alex G. <ale...@ne...> - 2010-11-02 21:59:18
|
02.11.2010 18:38, Christian Blichmann kirjoitti:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
>
> TL;DR: Calling methods from an embedded Jython script does nothing when
> using JSR-223 and Jython 2.5.1, while Jython 2.2.1 just works fine.
Works fine for me. Jython 2.5.x contains its own JSR-223 engine so don't
try to use the old engine jar with the new Jython. That leads to...well,
you already know ;)
> [Disclaimer: This is my first post on this list, so please go easy on me
> :-)]
>
> I'm currently trying to switch to Jython 2.5.1 from 2.2.1 and I'm having
> a real hard time getting it to work...
> Naively, I would've thought that replacing jython.jar with a new one
> from 2.5.1 and removing jython-script.jar would just work.
> I'm using the JSR-223 interface to embed the scripting engine. By
> itself, everything seems to work as expected and the same way as in
> Jython 2.2.1 (apart from the newer language that is).
> The only thing that is not working for me is implementing a Java
> interface from Python and calling methods on it. I have created a small
> test program for this:
>
> - ------------- myscript/ScriptingTest.java -------------
> package myscript;
>
> import java.io.InputStream;
> import java.io.InputStreamReader;
>
> import javax.script.ScriptEngine;
> import javax.script.ScriptEngineManager;
>
> public class ScriptingTest {
> public static void main(String[] args) {
> try {
> final ScriptEngineManager manager =
> new ScriptEngineManager();
> final ScriptEngine engine =
> manager.getEngineByName("python");
>
> final InputStream is =
> ScriptingTest.class.getResourceAsStream(
> "/myscript/myscript.py");
> engine.eval(new InputStreamReader(is));
> } catch (final Exception e) {
> e.printStackTrace();
> }
> }
> }
> - ------------- myscript/PythonCallable.java -------------
> package myscript;
>
> public interface PythonCallable {
> String getAString();
> void callAVoid();
> }
> - ------------- myscript/myscript.py -------------
> from myscript import PythonCallable as PythonCallable
>
> class MyPythonCallable(PythonCallable):
> def getAString(self):
> return 'A string'
>
> def callAVoid(self):
> print 'Called a void method'
>
> print 'getAString() returns: %s' % \
> MyPythonCallable().getAString()
> print 'callAVoid():'
> MyPythonCallable().callAVoid()
> - ------------------------------------------------
>
> Using Jython 2.2.1, I get:
> $ java -cp .:jython.jar:jython-engine.jar myscript.ScriptingTest
> getAString() returns: A string
> callAVoid():
> Called a void method
>
> This is just the way I would expect things to behave (OT: embedding
> JavaScript and using a similiar script gives similiar output).
>
> Using a Jython 2.5.1 JAR, as created by the installer (with the default
> options), I get this instead:
> $ java -cp .:jython.jar myscript.ScriptingTest
> getAString() returns: None
> callAVoid():
>
> I also tried Jython 2.5.2 RC2 with the same result.
>
> If it matters: my environment is Debian Linux 5.0 AMD64 with the Sun
> Java 1.6 JVM, Windows seems to behave the same way.
>
> Am I doing something fundamentally wrong? Is using JSR-223 this way
> supported at all in Jython 2.5.1? If I missed relevant documentation,
> can somebody point me in the right direction?
>
> Cheers,
>
> - --
> Christian Blichmann
>
> ========================================================================
> zynamics GmbH - Address: Grosse Beckstrasse 3, 44787 Bochum, Germany
> - Phone: +49 (234) 6 87 07 86 - Fax: +49 (234) 57 00 02 00
> - UstId: DE814229418 - Trade Register: HRB 9626
> ========================================================================
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJM0D6eAAoJEOF0gv4uh+kfP9IH/AzhqpssyjnEnKE8wZlIeg07
> /0MmWLMFxaLaugypd01X/hEYMYP9OE1oK3IqOAeDhRzkktzZuImVa90+gfTXzXhT
> 3svAGOPlNhqs9I0V1O39/b/QSMfi4k7pkRYAuM8Ou70vWJunGnStoqMtvUrA3Tb8
> 0ho8LzBiRgBLsCI+WTF7J0zNg+qKzGF/UW6G8zoWIRLTNpGEDcboPnc1kZ7W7OY7
> Bk8VmHVCDkziSFdu3oGsY7D2ZqG36xrv80jHnXv0+6BSdvJ6XfRnPc/ZLefyt2pG
> uYvkjLDp7VWzyO6VSy1wFAQoybXsVupYQPGVk5UD4Y8+ShpAXCS3ew3YJcZAkNc=
> =xBNK
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps& games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Jython-users mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/jython-users
|
|
From: Christian B. <chr...@zy...> - 2010-11-03 09:28:13
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/02/2010 10:59 PM, Alex Grönholm wrote:
> 02.11.2010 18:38, Christian Blichmann kirjoitti:
> Hi there,
>
> TL;DR: Calling methods from an embedded Jython script does nothing when
> using JSR-223 and Jython 2.5.1, while Jython 2.2.1 just works fine.
>> Works fine for me.
Mind you, using Jython itself works as expected, only interfacing with
Java doesn't work for me.
>> Jython 2.5.x contains its own JSR-223 engine so don't
>> try to use the old engine jar with the new Jython. That leads to...well,
>> you already know ;)
Same result with Jython 2.5.2 RC2, sorry:
+--- Jython 2.5.2 RC2 (full)
v
$ java -cp .:jython.jar myscript.ScriptingTest
getAString() returns: None
callAVoid():
Just tried with Windows 7 x64 and Java 1.6.0_22, also same result:
C:\TEMP>java -cp.:jython.jar myscript
getAString() returns: None
callAVoid():
Anything else I can do? I'd rather not use the interpreter directly and
only go through the JSR-223 API, since the application I'm embedding
Jython in also has to support Jruby and JavaScript and using a different
API would be a pain, maintenance and testing wise.
I'll also try with the latest trunk version to see if that changes
anything (I'll have to build it first, so it might take a while).
> [...]
Thanks for you quick replies, guys.
Cheers,
- --
Christian Blichmann
========================================================================
zynamics GmbH - Address: Grosse Beckstrasse 3, 44787 Bochum, Germany
- Phone: +49 (234) 6 87 07 86 - Fax: +49 (234) 57 00 02 00
- UstId: DE814229418 - Trade Register: HRB 9626
========================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJM0SrWAAoJEOF0gv4uh+kf2PAH/0evtbfaciXgM3s7iPuxVWl5
pto7Uq6GgBdbjH5LG08ppAbFY0Lg1aGUsyERCAmTcAbtAJXqevtDBF+8Tdzhw+NQ
LQ7qBrzXgoOYNQrsOlm3Q2Xk3YiDcLhrJHJQwJ6JpQMW9wDqbOqYzaRHYYrDTUhw
LF06zqJ7ExZmO920SAFIBQmzyd30Mox3EJ/ZDSyn2nwb8V1PD+/pspxoGyApZlXe
qmVnrvsOVhNeqlVPek2enHgsEVx1icQR7QmVLZvVTM9zLO2YHb0MnHc5BQoM4/c8
BtvMplVSMavqMziVO9sVcODlUH+yoKqmFiiMZ+zvr47umxaDzMUSxNYUw4lFGrE=
=OyDE
-----END PGP SIGNATURE-----
|
|
From: Christian B. <chr...@zy...> - 2010-11-25 14:30:12
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/03/2010 11:59 AM, Alex Grönholm wrote:
> 03.11.2010 11:26, Christian Blichmann kirjoitti:
> On 11/02/2010 10:59 PM, Alex Grönholm wrote:
>>>> 02.11.2010 18:38, Christian Blichmann kirjoitti:
>>>> [...]
> Same result with Jython 2.5.2 RC2, sorry:
>> I got the same results here too. Must've misread something (too tired
>> perhaps).
>> Will investigate and try to have it fixed before 2.5.2 final.
> [...]
Any news? Is there some bug id or something assigned to the issue (so I
can track it there instead of bothering you guys)?
> [...]
> I'll also try with the latest trunk version to see if that changes
> anything (I'll have to build it first, so it might take a while).
>
Just tried with a fresh SVN checkout of trunk from today, no change in
bahavior :(
>>>> [...]
Cheers,
- --
Christian Blichmann
========================================================================
zynamics GmbH - Address: Grosse Beckstrasse 3, 44787 Bochum, Germany
- Phone: +49 (234) 6 87 07 86 - Fax: +49 (234) 57 00 02 00
- UstId: DE814229418 - Trade Register: HRB 9626
========================================================================
E-mail Confidentiality Notice and Disclaimer
This e-mail and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to which they
are addressed. Access to this e-mail by anyone else is unauthorized. If
you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited. E-mail messages are not necessarily secure. zynamics
GmbH does not accept responsibility for any changes made to this message
after it was sent.
========================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJM7nHCAAoJEOF0gv4uh+kfKasH/1vVWw5OaZMLgf+7BBmA7zOu
KFeMpgtB2ndahpJBUfmBLi0GUBIEIKxGRoS66ncaeKo9Bigl/QwQzLzwsjf55Nhk
KZie+V+ByjVOFX1uO5q5py2UAmIbH+cR9EOIOwAtGLtRCFivmxXgQkRh46yJgcMp
m7AlESnXK8rXLPQ1UKs2uvD9tnqtXglm6dfLGw7ZQSFf83LT3POWgbR1lAlBBI96
gUg6gzsq9eAMYSHb+BsNvQW9oZpDYkyb8DInIDdAhIm4KT1V9U0PAifQ0sjF5bTQ
8YDKKgZrnZj+H6Qh8aHt8dkSS9pzLfvSquzy7RbxPoxZCW/GeehN/nwbM3esojk=
=gk8U
-----END PGP SIGNATURE-----
|
|
From: Oti <oh...@gm...> - 2010-12-05 10:10:47
|
Hi Christian, you are right, no news so far. I opened the following ticket: http://bugs.jython.org/issue1681 and I'll try dive into it. best wishes, Oti. On Thu, Nov 25, 2010 at 3:25 PM, Christian Blichmann <chr...@zy...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 11/03/2010 11:59 AM, Alex Grönholm wrote: >> 03.11.2010 11:26, Christian Blichmann kirjoitti: >> On 11/02/2010 10:59 PM, Alex Grönholm wrote: >>>>> 02.11.2010 18:38, Christian Blichmann kirjoitti: >>>>> [...] >> Same result with Jython 2.5.2 RC2, sorry: >>> I got the same results here too. Must've misread something (too tired >>> perhaps). >>> Will investigate and try to have it fixed before 2.5.2 final. >> [...] > > Any news? Is there some bug id or something assigned to the issue (so I > can track it there instead of bothering you guys)? > >> [...] >> I'll also try with the latest trunk version to see if that changes >> anything (I'll have to build it first, so it might take a while). >> > > Just tried with a fresh SVN checkout of trunk from today, no change in > bahavior :( > >>>>> [...] > > Cheers, > > - -- > Christian Blichmann > > ======================================================================== > zynamics GmbH - Address: Grosse Beckstrasse 3, 44787 Bochum, Germany > - Phone: +49 (234) 6 87 07 86 - Fax: +49 (234) 57 00 02 00 > - UstId: DE814229418 - Trade Register: HRB 9626 > ======================================================================== > E-mail Confidentiality Notice and Disclaimer > This e-mail and any files transmitted with it are confidential and are > intended solely for the use of the individual or entity to which they > are addressed. Access to this e-mail by anyone else is unauthorized. If > you are not the intended recipient, any disclosure, copying, > distribution or any action taken or omitted to be taken in reliance on > it, is prohibited. E-mail messages are not necessarily secure. zynamics > GmbH does not accept responsibility for any changes made to this message > after it was sent. > ======================================================================== > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJM7nHCAAoJEOF0gv4uh+kfKasH/1vVWw5OaZMLgf+7BBmA7zOu > KFeMpgtB2ndahpJBUfmBLi0GUBIEIKxGRoS66ncaeKo9Bigl/QwQzLzwsjf55Nhk > KZie+V+ByjVOFX1uO5q5py2UAmIbH+cR9EOIOwAtGLtRCFivmxXgQkRh46yJgcMp > m7AlESnXK8rXLPQ1UKs2uvD9tnqtXglm6dfLGw7ZQSFf83LT3POWgbR1lAlBBI96 > gUg6gzsq9eAMYSHb+BsNvQW9oZpDYkyb8DInIDdAhIm4KT1V9U0PAifQ0sjF5bTQ > 8YDKKgZrnZj+H6Qh8aHt8dkSS9pzLfvSquzy7RbxPoxZCW/GeehN/nwbM3esojk= > =gk8U > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
|
From: Alex G. <ale...@ne...> - 2010-11-03 10:59:25
|
03.11.2010 11:26, Christian Blichmann kirjoitti: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 11/02/2010 10:59 PM, Alex Grönholm wrote: >> 02.11.2010 18:38, Christian Blichmann kirjoitti: >> Hi there, >> >> TL;DR: Calling methods from an embedded Jython script does nothing when >> using JSR-223 and Jython 2.5.1, while Jython 2.2.1 just works fine. >>> Works fine for me. > Mind you, using Jython itself works as expected, only interfacing with > Java doesn't work for me. > >>> Jython 2.5.x contains its own JSR-223 engine so don't >>> try to use the old engine jar with the new Jython. That leads to...well, >>> you already know ;) > Same result with Jython 2.5.2 RC2, sorry: I got the same results here too. Must've misread something (too tired perhaps). Will investigate and try to have it fixed before 2.5.2 final. > +--- Jython 2.5.2 RC2 (full) > v > $ java -cp .:jython.jar myscript.ScriptingTest > getAString() returns: None > callAVoid(): > > Just tried with Windows 7 x64 and Java 1.6.0_22, also same result: > > C:\TEMP>java -cp.:jython.jar myscript > getAString() returns: None > callAVoid(): > > Anything else I can do? I'd rather not use the interpreter directly and > only go through the JSR-223 API, since the application I'm embedding > Jython in also has to support Jruby and JavaScript and using a different > API would be a pain, maintenance and testing wise. > > I'll also try with the latest trunk version to see if that changes > anything (I'll have to build it first, so it might take a while). > >> [...] > Thanks for you quick replies, guys. > > Cheers, > > - -- > Christian Blichmann > > ======================================================================== > zynamics GmbH - Address: Grosse Beckstrasse 3, 44787 Bochum, Germany > - Phone: +49 (234) 6 87 07 86 - Fax: +49 (234) 57 00 02 00 > - UstId: DE814229418 - Trade Register: HRB 9626 > ======================================================================== > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJM0SrWAAoJEOF0gv4uh+kf2PAH/0evtbfaciXgM3s7iPuxVWl5 > pto7Uq6GgBdbjH5LG08ppAbFY0Lg1aGUsyERCAmTcAbtAJXqevtDBF+8Tdzhw+NQ > LQ7qBrzXgoOYNQrsOlm3Q2Xk3YiDcLhrJHJQwJ6JpQMW9wDqbOqYzaRHYYrDTUhw > LF06zqJ7ExZmO920SAFIBQmzyd30Mox3EJ/ZDSyn2nwb8V1PD+/pspxoGyApZlXe > qmVnrvsOVhNeqlVPek2enHgsEVx1icQR7QmVLZvVTM9zLO2YHb0MnHc5BQoM4/c8 > BtvMplVSMavqMziVO9sVcODlUH+yoKqmFiiMZ+zvr47umxaDzMUSxNYUw4lFGrE= > =OyDE > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |