#jython IRC Log (v0.9)

Index

IRC Log for 2011-12-19

Timestamps are in GMT/BST.

[0:20] * stakkars_ (~tismer@p5DDB72FD.dip.t-dialin.net) has joined #jython
[0:26] * stakkars (~tismer@p5DDB72FD.dip.t-dialin.net) Quit (Quit: stakkars)
[0:26] * stakkars_ is now known as stakkars
[0:28] * stakkars_ (~tismer@p5DDB72FD.dip.t-dialin.net) has joined #jython
[0:55] * Swicher (ircap@host45.200-117-193.telecom.net.ar) has joined #jython
[1:08] <Swicher> Hello all, I want to test a library called MimeUtil ( http://sourceforge.net/projects/mime-util ) in Jython console and try to import this in the following ways: import mimeUtil, import mimeutil.jar, import eu.medsea.mimeutil.MimeUtil ( http://www.rgagnon.com/javadetails/java-0487.html ) but certainly this ways not works, does anyone know how to do this correctly?. Before you ask, prior start
[1:08] <Swicher> Jython in the directory where is the library
[1:12] <agronholm> Swicher: you can't import jars, only classes (in the case of Java)
[1:12] <agronholm> you have to have the jar in your JYTHONPATH or CLASSPATH for import to work
[1:13] <Swicher> Well, and where I get the JYTHONPATH or CLASSPATH?
[1:13] <agronholm> they are environment variables
[1:14] <agronholm> have you never used java before?
[1:15] <Swicher> Ok, will review and if know Java, although I do not get along with this language, why you think I'm trying Jython?
[1:16] <agronholm> Swicher: people have many reasons to use Jython
[1:16] <agronholm> some need to use Java libs from Python and could not do it from CPython
[1:18] * shashank (~shashank@65-101-219-90.hlrn.qwest.net) has joined #jython
[1:19] <Swicher> I understand, but in my case I decided use Jython to try libraries (as MimeUtil) or code snippets for inclusion in other projects and not have to create a new project with my IDE just to test this kind of thing
[1:55] * offbyone_ (u910@gateway/web/irccloud.com/x-ycwikfgzjxncqlnt) has joined #jython
[2:04] * offbyone (u910@gateway/web/irccloud.com/x-tzjfswhvqqiyqkmp) Quit (Max SendQ exceeded)
[2:21] * jimbaker (~jbaker@c-75-71-80-146.hsd1.co.comcast.net) has joined #jython
[2:21] * jimbaker (~jbaker@c-75-71-80-146.hsd1.co.comcast.net) Quit (Changing host)
[2:21] * jimbaker (~jbaker@canonical/jimbaker) has joined #jython
[2:26] <Swicher> agronholm, I was trying to do what you said. As the CLASSPATH environment variable did not exist, I created it with the path where are the Java libraries (C:\Program Files\Java\jre6\lib) and then restart Jython, but I still get the error "ImportError : No module named eu ", at what is this?
[2:27] <agronholm> Swicher: you have to give it the exact paths to jar files, or with java 6 or greater, something like C:\Program Files\Java\jre6\lib\*
[4:54] <Swicher> I found the way to solve my problem based on what appears on http://h30499.www3.hp.com/t5/CMS-and-DIscovery-Support-Forum/DDMA-jython-script-import-external-jar/td-p/5320295 but now I get another error: "java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: Could not initialize class eu.medsea.mimeutil.MimeUtil" (although I guess that's something that generates the own library, I'm
[4:54] <Swicher> still investigating that happening)
[5:00] <Swicher> With "from eu.medsea.mimeutil import MimeUtil" import the MimeUtil object as "NoneType" (type(MimeUtil) ---> <type 'NoneType'>)
[5:11] * fwierzbicki (~frank@99.106.170.105) Quit (Ping timeout: 252 seconds)
[5:25] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[6:25] * Swicher (ircap@host45.200-117-193.telecom.net.ar) Quit (Ping timeout: 248 seconds)
[6:32] * Swicher (ircap@host165.200-45-61.telecom.net.ar) has joined #jython
[6:38] * shashank (~shashank@65-101-219-90.hlrn.qwest.net) Quit (Ping timeout: 248 seconds)
[9:26] * Swicher (ircap@host165.200-45-61.telecom.net.ar) Quit (Quit: ?? IRcap ?? 8.6 ??)
[10:44] * pjenvey (~pjenvey@underboss.org) Quit (Quit: ZNC - http://znc.sourceforge.net)
[10:44] * pjenvey (~pjenvey@underboss.org) has joined #jython
[11:10] * wainersm (~wainersm@201.82.225.3) has joined #jython
[11:11] * juneau001 (~juneau@50-103-33-239.dklb.il.frontiernet.net) Quit (Quit: juneau001)
[12:13] * juneau001 (~juneau@131.225.24.82) has joined #jython
[12:44] * stakkars__ (~tismer@p5DDB72FD.dip.t-dialin.net) has joined #jython
[12:47] * [Arfrever] (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 252 seconds)
[12:47] * JStoker (jstoker@unaffiliated/jstoker) Quit (Ping timeout: 244 seconds)
[12:47] * stakkars_ (~tismer@p5DDB72FD.dip.t-dialin.net) Quit (Ping timeout: 244 seconds)
[12:48] * stakkars (~tismer@p5DDB72FD.dip.t-dialin.net) Quit (Ping timeout: 240 seconds)
[12:48] * MacRohard (rm@felix.lechat.ir) Quit (Ping timeout: 240 seconds)
[12:48] * stakkars__ is now known as stakkars
[12:49] * JStoker (jstoker@unaffiliated/jstoker) has joined #jython
[12:51] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Ping timeout: 245 seconds)
[12:51] * [Arfrever] (~Arfrever@apache/committer/Arfrever) has joined #jython
[12:52] * juneau001 (~juneau@131.225.24.82) Quit (*.net *.split)
[12:52] * 18VAACYUK (~tismer@p5DDB72FD.dip.t-dialin.net) has joined #jython
[12:52] * juneau001 (~juneau@131.225.24.82) has joined #jython
[12:57] * 18VAACYUK (~tismer@p5DDB72FD.dip.t-dialin.net) Quit (*.net *.split)
[12:57] * juneau001 (~juneau@131.225.24.82) Quit (*.net *.split)
[13:00] * 18VAACYUK (~tismer@p5DDB72FD.dip.t-dialin.net) has joined #jython
[13:00] * juneau001 (~juneau@131.225.24.82) has joined #jython
[13:30] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 252 seconds)
[14:52] * MacRohard (rm@192.75.207.149) has joined #jython
[15:22] * stakkars (~tismer@p5DDB72FD.dip.t-dialin.net) Quit (Quit: schnarch)
[16:00] * shashank (~shashank@65-101-219-90.hlrn.qwest.net) has joined #jython
[16:01] * stakkars (~tismer@89.204.154.12) has joined #jython
[16:04] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[16:04] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[16:05] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[16:32] * shashank (~shashank@65-101-219-90.hlrn.qwest.net) Quit (Ping timeout: 255 seconds)
[16:37] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 252 seconds)
[16:45] * stakkars (~tismer@89.204.154.12) Quit (Ping timeout: 240 seconds)
[16:55] * stakkars (~tismer@89.204.154.12) has joined #jython
[16:59] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[17:52] * r0bby (~wakawaka@guifications/user/r0bby) has joined #jython
[17:54] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)
[18:33] * shashank (~shashank@65-101-219-90.hlrn.qwest.net) has joined #jython
[19:25] * r0bby (~wakawaka@guifications/user/r0bby) Quit (Max SendQ exceeded)
[19:27] * r0bby (~wakawaka@guifications/user/r0bby) has joined #jython
[19:27] * r0bby (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[19:27] * r0bby_ (~wakawaka@guifications/user/r0bby) has joined #jython
[19:40] * r0bby_ (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[19:40] * r0bby_ (~wakawaka@guifications/user/r0bby) has joined #jython
[19:52] * ezekiel_ (~ezekiel@184.152.109.19) has joined #jython
[19:52] <ezekiel_> hi, wondering if jython is compatible with the latest versions of both openjdk and sunjdk - I couldn't find any information on the install page at jython.org
[19:53] <agronholm> sure
[19:53] <agronholm> that is what it is primarily run on
[19:53] <agronholm> and there isn't much difference between openjdk and oracle's jdk
[19:56] <ezekiel_> i see
[19:56] <agronholm> java web start is among the most notable of those differences
[19:57] <ezekiel_> and i suppose that most new marketable features that oracle develops will be sun exclusive as well
[19:58] <agronholm> no
[19:58] <ezekiel_> is one of the implementations over another used as jython's reference implementation by core developers for testing?
[19:58] <agronholm> openjdk is where the main development happens
[19:58] <agronholm> not afaik
[19:59] <ezekiel_> ic
[19:59] <ezekiel_> thanks
[20:01] <ezekiel_> i'm starting to read 'the definitive guide to jython' book
[20:01] <ezekiel_> coming from a python programmer's background
[20:03] <agronholm> what's your use case for jython?
[20:05] <ezekiel_> probably web based
[20:05] <agronholm> I mean, why are you using jython and not cpython or pypy
[20:05] <ezekiel_> oh.. i'm trying to see if i'd be able to incorporate python when i start working at a bank
[20:06] <ezekiel_> they're mostly java based
[20:06] <agronholm> it is doubtful that they will let you incorporate jython
[20:06] <jimbaker> ezekiel_, sounds like a good reason to me. jython definitely has its presence in these types of situations. especially because there's often java integraton involved
[20:07] <jimbaker> and it is used at some fairly high profile banks, fwiw
[20:07] <ezekiel_> wow, i just heard yes and no at the same time :P
[20:07] <agronholm> well, let us know when you do get there
[20:08] <ezekiel_> i think they're mostly using ibm
[20:08] <ezekiel_> websphere and things like that
[20:08] <jimbaker> ezekiel_, agronholm uses jython but regrets some aspects of it as i understand it. i am a jython committer, so i have to look at it from the bright side
[20:08] <jimbaker> :)
[20:08] <agronholm> regrets = still stuck in the 2.5 era, slow startup, compatibility issues
[20:09] <agronholm> the 2.5 thing is particularly painful
[20:09] <jimbaker> agronholm, exactly, but we are working on these issues. too bad it's all in our spare time. that is one thing to consider
[20:09] <ezekiel_> what's the biggest feature you're missing from 2.6/7?
[20:09] <jimbaker> however, we have kept it going for the last 13 years, so probably has some life in it :)
[20:10] <ezekiel_> 2.5 is not that bad, and i assume you're not longing for 3.x yet..
[20:10] <jimbaker> ezekiel_, jython is very compatible with 2.5 python. the biggest issue is some corner cases in java integration
[20:11] <ezekiel_> otoh compatibility issues does sound kinda troublesome
[20:11] <jimbaker> previous versions of jython were only loosely compatible with cpython
[20:13] <jimbaker> i will say the java integration is a bit of a mess in the internal code. we are working on improving that story, so that will help with being more consistent. although generally it is possible to make jython do the right thing with a bit of metaprogramming, all in python
[20:14] <agronholm> ezekiel_: I am longing for 3.x
[20:14] <agronholm> chained exceptions would be very welcome
[20:14] <agronholm> as would unicode-by-default be
[20:14] <jimbaker> see for example http://www.jython.org/jythonbook/en/1.0/Concurrency.html#interruption - the workaround is no longer necessary for 2.5.2, btw
[20:15] <jimbaker> but is indicative of what can be done
[20:25] * juneau001 (~juneau@131.225.24.82) Quit (Quit: juneau001)
[20:35] <ezekiel_> ic.. monkeypatching isn't usually a first choice.. i figured so many libs haven't ported to 3 that it still isn't the version of choice, but that may evaluate differently in the jython world because you now have all of the java libs available to you
[20:38] <ezekiel_> so the language features could play a bigger role than lib dependencies, that is
[20:41] <jimbaker> ezekiel_, in general, if you have to be in the java world, jython is a very good choice ("we write java so you don't have to"). if you have a choice of pythons to use, it's definitely worth considering another variant like pypy or cpython
[20:44] <ezekiel_> jimbaker: is jython still a good choice for working on pre-existing large bodies of code, or only for starting from scratch?
[20:45] <jimbaker> ezekiel_, if the codebase is 2.5 and well-behaved (doesn't rely on ref counting to manage object lifetimes), it should work well. best if you have good unit tests, so you can verify directly
[20:47] <jimbaker> there are some gotchas however, especially around c-extension support. so no one has ported PIL for example (it's just too big and too poorly tested)
[20:48] <ezekiel_> oh actually i meant for pre-existing bodies of java code
[20:48] <jimbaker> ezekiel_, it should work *just fine*
[20:49] <ezekiel_> i see.. thanks
[20:50] <jimbaker> ezekiel_, glad i could be of help. definitely take a look at jythonbook.com, which gets into much more of these details
[20:50] <ezekiel_> yeah, actually i bought the book
[20:51] <ezekiel_> are there are a lot of updates or changes since the book was published?
[20:51] <jimbaker> ezekiel_, thanks!
[20:51] <jimbaker> (and i'm sure our publisher appreciates the business too ;) )
[20:53] <ezekiel_> jimbaker: sure, hope it helps
[20:54] <jimbaker> ezekiel_, i don't think there have been too many changes per se. the book was published with respect to 2.5.1, which was a big catchup. 2.5.2, which was released about 6 months ago was mostly bug fixes: http://www.jython.org/latest.html
[20:55] <jimbaker> maybe jsr-223 was the biggest change with respect to java integration
[20:57] <jimbaker> i wrote up some more on this: http://www.zyasoft.com/pythoneering/2010/09/jython-2.5.2-beta-2-is-released/
[21:48] * wainersm (~wainersm@201.82.225.3) Quit (Quit: Ex-Chat)
[22:01] * stakkars (~tismer@89.204.154.12) Quit (Quit: schnarch)
[22:25] * stakkars (~tismer@p5DDB72FD.dip.t-dialin.net) has joined #jython
[22:31] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[22:32] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Ping timeout: 245 seconds)
[22:34] * r0bby_ (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)

Index

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