#jython IRC Log


IRC Log for 2014-09-30

Timestamps are in GMT/BST.

[0:32] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 250 seconds)
[3:43] * [Arfrever] (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 260 seconds)
[3:44] * [Arfrever] (~Arfrever@apache/committer/Arfrever) has joined #jython
[3:49] * [Arfrever] (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 258 seconds)
[4:02] * [Arfrever] (~Arfrever@apache/committer/Arfrever) has joined #jython
[4:21] * mbooth (~mbooth@redhat/mbooth) Quit (Ping timeout: 260 seconds)
[4:23] * mbooth (~mbooth@redhat/mbooth) has joined #jython
[4:40] * ebarrett (~edd@88-106-243-223.dynamic.dsl.as9105.com) Quit (Ping timeout: 245 seconds)
[4:42] * ebarrett (~edd@host-92-20-142-254.as13285.net) has joined #jython
[5:38] <agronholm> I have a big problem. I found I can no longer deploy my Jython app via Java Web Start. This is because sys.prefix is None and so sysconfig.py crashes when it tries to normalize the sys.prefix. What can I do?
[5:38] <agronholm> I was supposed to deploy this app yesterday.
[5:51] <agronholm> I do PySystemState.initialize() and then new PythonInterpreter() and there it crashes
[5:57] <agronholm> the exact same kind of initialization worked with 2.5.x
[5:59] <agronholm> also, if I use an umodified standalone jar, it will raise ImportError: No module named site
[5:59] <agronholm> apparently it can't find the modules in Lib/
[6:02] <paolo> did this kind of deploy work in the past?
[6:02] <agronholm> yes, for many years
[6:02] <paolo> oh sorry missed that you also wrote that
[6:02] <agronholm> it stopped working once I switched to Jython 2.7
[6:03] <agronholm> also for some incomprehensible reason, ant also stopped working but I could work around that
[6:03] <agronholm> it stopped working on all my machines X_X
[6:03] <agronholm> it couldn't find a clbuild.xml:35: taskdef A class needed by class org.python.util.JycompileAntTask cannot be found: org/python/apache/tools/ant/taskdefs/MatchingTask
[6:03] <agronholm> using the classloader AntClassLoader[/home/etikettu/jython2.7/jython.jar]
[6:03] <agronholm> oops
[6:04] <agronholm> anyway it couldn't find a class that was clearly on the class path
[6:04] <agronholm> and this had worked just fine until I upgraded to openjdk 7
[6:05] <paolo> ant stopped working doing what? while compiling jython from source?
[6:05] <agronholm> no, it wouldn't run JycompileAntTask anymore
[6:05] <agronholm> which is the ant equivalent of jython -m compileall
[6:06] <agronholm> I'm going to bed now. If anyone has any ideas how to fix this, please let me know.
[6:38] * a42niem (~niem@p578b7daf.dip0.t-ipconnect.de) has joined #jython
[6:47] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:48] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 250 seconds)
[8:07] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[9:07] <paolo> agronholm: i found this, "The quickest way to solve this problem (sys.prefix which is None) is to set a value for the python.home property in the web.xml for your modjy application."
[9:08] <paolo> your app is not on modjy, but you should have a web.xml anyway
[9:09] <paolo> and with a bit of luck maybe it can work for your case, too.
[11:40] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Excess Flood)
[11:41] * robbyoconnor (~wakawaka@cpe-68-174-63-155.hvc.res.rr.com) has joined #jython
[12:54] * ebarrett (~edd@host-92-20-142-254.as13285.net) Quit (Ping timeout: 245 seconds)
[13:00] * ebarrett (~edd@host-92-20-142-254.as13285.net) has joined #jython
[13:01] * ebarrett_ (~edd@host-92-20-142-254.as13285.net) has joined #jython
[13:07] * gthank (~gthank@unaffiliated/gthank) has joined #jython
[13:46] * xemdetia (xemdetia@nat/ibm/x-smpkvhevagrqjzle) has joined #jython
[13:49] * xemdetia (xemdetia@nat/ibm/x-smpkvhevagrqjzle) Quit (Read error: Connection reset by peer)
[13:49] * xemdetia (xemdetia@nat/ibm/x-hhrcddzhmuqxsgub) has joined #jython
[13:49] * xemdetia (xemdetia@nat/ibm/x-hhrcddzhmuqxsgub) Quit (Read error: Connection reset by peer)
[13:50] * xemdetia (xemdetia@nat/ibm/x-pqievnxkbmuwpdbx) has joined #jython
[13:51] * xemdetia (xemdetia@nat/ibm/x-pqievnxkbmuwpdbx) Quit (Read error: Connection reset by peer)
[13:56] * xemdetia (xemdetia@nat/ibm/x-ewutaqzfvjqjbzdp) has joined #jython
[13:57] <agronholm> paolo: thanks. I'll see if setting python.home will do anything.
[14:01] * ebarrett_ (~edd@host-92-20-142-254.as13285.net) Quit (Quit: leaving)
[14:01] * ebarrett (~edd@host-92-20-142-254.as13285.net) Quit (Quit: leaving)
[14:01] * ebarrett (~edd@host-92-20-142-254.as13285.net) has joined #jython
[15:06] <jimbaker> agronholm, paolo - thanks for digging into this re sys.prefix
[15:06] <jimbaker> agronholm, i also need to follow up on html5lib-python
[15:07] <agronholm> it just seemed odd to me that it worked in development, and running the standalone jar works fine but for some reason it doesn't work with JWS
[15:07] <agronholm> the only way to make it find the stdlib modules is to move them from Lib/ to the root of the jar
[15:32] <a42niem> hm, I still get an error regarding "duplicate entry: META-INF/BCKEY.DSA" when trying to create 2.7b3 standalone using the installer
[15:36] <agronholm> a42niem: so download the prepackaged one
[15:43] <a42niem> sure, sorry
[16:05] * lheuer1 (~Adium@dyndsl-037-138-193-173.ewe-ip-backbone.de) has joined #jython
[16:08] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 250 seconds)
[16:24] <jimbaker> a42niem, this is a bug we have, sorry about that - http://bugs.jython.org/issue2196
[17:07] * mbooth (~mbooth@redhat/mbooth) Quit (Ping timeout: 246 seconds)
[17:27] * lheuer1 is now known as lheuer
[17:29] * robbyoconnor (~wakawaka@cpe-68-174-63-155.hvc.res.rr.com) Quit (Ping timeout: 260 seconds)
[17:41] * mbooth (~mbooth@ has joined #jython
[17:41] * mbooth (~mbooth@ Quit (Changing host)
[17:41] * mbooth (~mbooth@redhat/mbooth) has joined #jython
[17:59] * gthank (~gthank@unaffiliated/gthank) Quit (Ping timeout: 258 seconds)
[18:59] * fwierzbicki (~Adium@99-106-169-5.lightspeed.sntcca.sbcglobal.net) Quit (Quit: Leaving.)
[19:11] <agronholm> jimbaker: any idea what might cause the problem with ant?
[19:11] <agronholm> does the jython ant compile task work for you?
[19:47] * mbooth (~mbooth@redhat/mbooth) Quit (Ping timeout: 258 seconds)
[19:48] * lheuer (~Adium@dyndsl-037-138-193-173.ewe-ip-backbone.de) Quit (Quit: Leaving.)
[20:12] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[20:20] * fwierzbicki (~Adium@99-106-169-5.lightspeed.sntcca.sbcglobal.net) has joined #jython
[20:34] * fwierzbicki (~Adium@99-106-169-5.lightspeed.sntcca.sbcglobal.net) Quit (Quit: Leaving.)
[20:35] * fwierzbicki (~Adium@99-106-169-5.lightspeed.sntcca.sbcglobal.net) has joined #jython
[21:13] <paolo> guys anyone using execnet to call jython from python?
[21:13] <paolo> i'm trying to do that but have some problem
[21:13] <paolo> if anyone can help, here it is https://gist.github.com/paolodina/f2cbf7b1c7cee2756b05
[21:14] <paolo> thanks :)
[21:16] <agronholm> paolo: wouldn't py4j serve that purpose better?
[21:17] <paolo> let's check
[21:19] <paolo> agronholm: does py4j replace jython?
[21:19] <agronholm> paolo: no
[21:19] <paolo> ok, then i have to understand how they work together
[21:19] <agronholm> but I'm using it to interface with java libraries from a cpython app
[21:21] <paolo> i have a webapp in django that could run on cpython, except for a couple of calls to java methods. my idea is to run the app on python (replacing jython) and use some bridge to call java from python
[21:22] <paolo> it makes sense to me
[21:24] <agronholm> sounds like py4j is the thing for you
[21:28] <paolo> but... does py4j handle custom instances derived from custom java types, or just "simple types" like builtins?
[21:29] <paolo> because the java methods return arraylists of that kind of instances
[21:31] <agronholm> paolo: you can set up a callback server and define the implemented interfaces in your class
[21:31] * xemdetia (xemdetia@nat/ibm/x-ewutaqzfvjqjbzdp) Quit (Ping timeout: 245 seconds)
[21:32] <paolo> wow.
[21:32] <agronholm> I use py4j with jasperreports which required me to do just that
[21:33] <agronholm> it's pretty easy too
[21:34] <paolo> agronholm: does it perform well, too?
[21:35] <agronholm> well, it's java
[21:35] <agronholm> running in an actual jvm process
[21:35] <paolo> oh right, native
[21:51] <paolo> an update, the docs says that jython performs better than py4j (because the latter relies on sockets)
[21:51] <paolo> http://py4j.sourceforge.net/about.html#alternatives-to-py4j
[21:51] <agronholm> that really depends on your operating model
[21:51] <agronholm> also you get to use cpython 3
[21:52] <agronholm> if you only need one java lib, py4j is the better choice IMO
[21:55] <paolo> the final goal is to interact from python with java classes that use neo4j and spring jars to return a result
[21:56] <paolo> and i'm doing that in python 2.7
[21:56] * a42niem (~niem@p578b7daf.dip0.t-ipconnect.de) Quit (Quit: Leaving.)


These logs were automatically created by JythonLogBot on irc.freenode.net using a slightly modified version of the Java IRC LogBot.