#jython IRC Log (v0.9)

Index

IRC Log for 2013-01-31

Timestamps are in GMT/BST.

[1:03] * f13o (~f13o@89.101.206.226) Quit (Read error: Operation timed out)
[1:32] * fwierzbicki (~frank@99-106-170-162.lightspeed.sntcca.sbcglobal.net) Quit (Ping timeout: 255 seconds)
[1:50] * darjus_ (~darjus@184-77-252-49.war.clearwire-wmx.net) has joined #jython
[1:51] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[1:53] * darjus (~darjus@96-26-62-132.war.clearwire-wmx.net) Quit (Ping timeout: 260 seconds)
[1:54] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) Quit (Read error: Connection reset by peer)
[1:55] * Thev00d00 (~v00d00@pegasus.v00d00.net) has joined #jython
[1:55] * Thev00d00 (~v00d00@pegasus.v00d00.net) Quit (Changing host)
[1:55] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) has joined #jython
[2:13] * Juneau001 (~Juneau@50-45-101-37.dklb.il.frontiernet.net) Quit (Quit: Juneau001)
[2:38] * dcoles (~dcoles@kria.dcoles.net) has left #jython
[2:53] * Juneau001 (~Juneau@50-45-101-37.dklb.il.frontiernet.net) has joined #jython
[3:40] * Juneau001 (~Juneau@50-45-101-37.dklb.il.frontiernet.net) Quit (Quit: Juneau001)
[3:50] * Juneau001 (~Juneau@50-45-101-37.dklb.il.frontiernet.net) has joined #jython
[4:17] * milind (~milind@cpe-70-112-108-200.austin.res.rr.com) has joined #jython
[4:46] * darjus_ (~darjus@184-77-252-49.war.clearwire-wmx.net) Quit (Read error: Connection reset by peer)
[4:47] * darjus_ (~darjus@184-77-252-49.war.clearwire-wmx.net) has joined #jython
[5:15] * milind (~milind@cpe-70-112-108-200.austin.res.rr.com) Quit (Ping timeout: 245 seconds)
[5:21] * meritum (~jakub@79.97.179.127) has joined #jython
[5:22] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[5:41] * thepro4ever (~thepro4ev@cpe-024-211-042-158.sc.res.rr.com) has joined #jython
[5:41] <thepro4ever> anyone here?
[5:48] * Juneau001 (~Juneau@50-45-101-37.dklb.il.frontiernet.net) Quit (Quit: Juneau001)
[5:54] * darjus_ (~darjus@184-77-252-49.war.clearwire-wmx.net) Quit (Quit: Konversation terminated!)
[5:58] * thepro4ever (~thepro4ev@cpe-024-211-042-158.sc.res.rr.com) Quit (Quit: leaving)
[6:02] * meritum (~jakub@79.97.179.127) Quit (Remote host closed the connection)
[6:46] * purplefox (~purplefox@host-78-150-4-241.as13285.net) has joined #jython
[6:57] <agronholm> yes
[6:57] <agronholm> duh
[7:03] * fwierzbicki (~frank@99-106-170-162.lightspeed.sntcca.sbcglobal.net) has joined #jython
[7:48] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[8:18] * synasius (~syn@host19-66-static.243-95-b.business.telecomitalia.it) has joined #jython
[11:12] * msavy (~msavy@redhat/jboss/msavy) Quit (Remote host closed the connection)
[12:14] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 255 seconds)
[12:19] * msavy (~msavy@redhat/jboss/msavy) has joined #jython
[13:07] * synasius (~syn@host19-66-static.243-95-b.business.telecomitalia.it) Quit (Quit: Sto andando via)
[13:51] * Juneau001 (~Juneau@131.225.24.178) has joined #jython
[13:53] * synasius (~syn@host19-66-static.243-95-b.business.telecomitalia.it) has joined #jython
[14:46] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[15:22] * msavy (~msavy@redhat/jboss/msavy) Quit (Remote host closed the connection)
[15:57] * milind (~milind@rrcs-71-42-144-170.sw.biz.rr.com) has joined #jython
[16:11] * msavy (msavy@redhat/jboss/msavy) has joined #jython
[16:13] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[16:19] * msavy_ (msavy@redhat/jboss/msavy) has joined #jython
[16:20] * msavy (msavy@redhat/jboss/msavy) Quit (Read error: Connection reset by peer)
[16:28] * msavy_ is now known as msavy
[16:34] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[16:56] * enebo_ (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[16:59] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Ping timeout: 248 seconds)
[16:59] * enebo_ is now known as enebo
[17:03] * Juneau001 (~Juneau@131.225.24.178) Quit (Read error: Connection reset by peer)
[17:03] * Juneau001 (~Juneau@fess-120727.dhcp.fnal.gov) has joined #jython
[17:09] * Juneau001 (~Juneau@fess-120727.dhcp.fnal.gov) Quit (Read error: Connection reset by peer)
[17:10] * Juneau001 (~Juneau@fess-120727.dhcp.fnal.gov) has joined #jython
[17:15] * synasius (~syn@host19-66-static.243-95-b.business.telecomitalia.it) Quit (Quit: Sto andando via)
[17:15] * Juneau001 (~Juneau@fess-120727.dhcp.fnal.gov) Quit (Quit: Juneau001)
[17:43] * Juneau001 (~Juneau@fess-120727.dhcp.fnal.gov) has joined #jython
[17:43] * Juneau001 (~Juneau@fess-120727.dhcp.fnal.gov) Quit (Client Quit)
[17:51] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[18:13] <purplefox> agronholm: fwierzbicki: Hi. I'm creating PythonInterpreter programmatically - is it possible to configure somewhere what path a particular PythonInterpreter instance uses for loading modules?
[18:14] <purplefox> agronholm: fwierzbicki: or does it always use a global CLASSPATH?
[18:22] <fwierzbicki> purplefox, you should be able to use sys.path.append for the PythonInterpreter's PySystemState
[18:25] <purplefox> fwierzbicki: I have this weird problem
[18:26] <fwierzbicki> purplefox, what's that?
[18:26] <purplefox> fwierzbicki: i am loading a script with py.exec
[18:26] <purplefox> fwierzbicki: the script imports a module
[18:26] <purplefox> fwierzbicki: which it finds find
[18:26] <purplefox> fwierzbicki: find fine
[18:26] <purplefox> fwierzbicki: (fat fingers)
[18:27] <purplefox> fwierzbicki: that module then tries to import a java class
[18:28] <purplefox> fwierzbicki: from core.http import HttpServer, HttpClient
[18:28] <purplefox> fwierzbicki: one sec
[18:29] <purplefox> fwierzbicki: sorry, this import org.vertx.java.core.http
[18:29] <purplefox> fwierzbicki: which complains:
[18:29] <purplefox> fwierzbicki: ImportError: No module named core
[18:30] <purplefox> fwierzbicki: core is a Java package which does exist
[18:30] <fwierzbicki> Is there any chance you a python directory at /org/vertx/java/ ?
[18:30] <fwierzbicki> such a directory would possibly obscure the java one
[18:30] * thereisnospoon_ (~thereisno@27-33-1-87.tpgi.com.au) has joined #jython
[18:31] <fwierzbicki> s/you/you have/
[18:31] <purplefox> fwierzbicki: you mean an /org from the root of the filesystem?
[18:31] <fwierzbicki> yeah
[18:31] <purplefox> fwierzbicki: nope
[18:31] <thereisnospoon_> just dropping by with a quick note that the guava upgrade on 2.7's mercurial tree only updated it in one place, jar-complete fails atm
[18:31] <purplefox> fwierzbicki: how does jython figure out where to load Java classes from>
[18:31] <purplefox> fwierzbicki: ?
[18:32] <purplefox> fwierzbicki: does it actually use the environment variable $CLASSPATH?
[18:32] <fwierzbicki> purplefox, it's part of the import mechanism, which is pretty involved. Is there any chance you could create a small example version of the problem?
[18:32] <fwierzbicki> purplefox, it does use $CLASSPATH
[18:33] <purplefox> fwierzbicki: I don't have CLASSPATH set
[18:33] <fwierzbicki> it uses other stuff too :)
[18:33] <fwierzbicki> sys.path
[18:33] <purplefox> fwierzbicki: but this wouldn't work anyway... since I need each PythonInterpreter instance to have its own claspath
[18:33] <purplefox> fwierzbicki: will it look for Java classes on sys.path too?
[18:33] <fwierzbicki> sure - you should be able to add things to sys.path
[18:33] <fwierzbicki> yes
[18:34] <purplefox> fwierzbicki: ah cool. i thought sys path as only used for python scritpts, and classpath was used for Java classes
[18:34] <fwierzbicki> so if you do: sys.path.append("/path/to/foo.jar"
[18:34] <fwierzbicki> )
[18:34] <fwierzbicki> we use java classes found on the classpath and on sys.path
[18:34] <purplefox> fwierzbicki: when you say "on the classpath" you mean classe found by the current classloader?
[18:35] <fwierzbicki> purplefox, yeah
[18:35] <purplefox> fwierzbicki: because each of our pythoninterpreter instances is running in its own classloader
[18:35] <purplefox> fwierzbicki: do you use thread context classloader?
[18:35] <fwierzbicki> so the java classes that can be found on that classloader should be found
[18:35] <fwierzbicki> I haven't used that myself no
[18:36] <purplefox> fwierzbicki: so basically whatever classloader loaded the PythonInterpreter class, it will use that to load classes?
[18:36] <fwierzbicki> it should yes
[18:37] <purplefox> fwierzbicki: ok thx, i will poke about a bit more and try and get it working
[18:37] <fwierzbicki> but it sounds like you are doing some sophisticated stuff with py.exec pulling in python pulling in java - I wonder if you've hit some corner case
[18:37] <fwierzbicki> if you where able to come up with a small example that shows the bug it might help us help
[18:38] <fwierzbicki> purplefox, cool - let me know how it goes!
[18:58] * f13o (~f13o@89.101.206.226) has joined #jython
[19:00] <purplefox> fwierzbicki: I've added some logging inside the classloader to see what jython is trying to get it to load
[19:01] <purplefox> fwierzbicki: and it's basically going throught the whole package hierarchy trying to load it
[19:01] <purplefox> fwierzbicki: e.g. Loading org.vertx.java.core
[19:01] <purplefox> fwierzbicki: but that's a package not a class
[19:01] <purplefox> fwierzbicki: so it can't find it
[19:02] <purplefox> fwierzbicki: btw this all used to work fine, until we loaded the PythonInterpreter in its own classloader
[19:03] <fwierzbicki> ah - that is a grey area - the finding of packages depends on the package cache mechanism. Lots of things can goof that up
[19:04] <fwierzbicki> I'd suggest looking up java classes explicitly and not try to pass around java packages
[19:04] <fwierzbicki> it's a limitation of Java - there is no native way to inspect a package
[19:05] <fwierzbicki> package.getClasses() doesn't exist so we have to hack around it
[19:05] <purplefox> fwierzbicki: you mean I should avoid import packages in scripts like this
[19:05] <purplefox> fwierzbicki: import org.vertx.java.core.http
[19:05] <fwierzbicki> yes
[19:05] <purplefox> fwierzbicki: and just reference classes with their FQCN?
[19:05] <fwierzbicki> better to "from org.vertx.java.core.http import HttpServer"
[19:06] <fwierzbicki> or fully qualify
[19:06] <purplefox> fwierzbicki: thx will give that a go
[19:06] <fwierzbicki> as long as you name the class it should work better
[19:06] <fwierzbicki> cool
[19:07] <fwierzbicki> I wish there was a better way - I've tried to get the JVM folks to give me a getClasses() but they are very busy :)
[19:07] <fwierzbicki> someday I may dust off my C++ skills and give it a try
[19:07] <fwierzbicki> but that assumes a lot of time on my hands :)
[19:08] * verterok (~ggonzalez@91.189.93.88) Quit (Ping timeout: 276 seconds)
[19:19] * verterok (~ggonzalez@91.189.93.88) has joined #jython
[19:22] * msavy (msavy@redhat/jboss/msavy) Quit (Remote host closed the connection)
[19:30] <purplefox> fwierzbicki: that's curious - using FQCN doesn't work either. but 'from org.vertx.java.core.http import HttpServer' does!
[19:30] <fwierzbicki> that is strange - that sounds like a real bug...
[19:31] <fwierzbicki> by "real" meaning it's one that I could do something about if I understood it better...
[19:31] <fwierzbicki> to be clear
[19:31] <fwierzbicki> doing
[19:32] <fwierzbicki> import org.vertx.core.http.HttpServer
[19:32] <fwierzbicki> then org.vertx.core.http.HttpServer(...)
[19:32] <fwierzbicki> does not work?
[19:32] <fwierzbicki> purplefox, ^^^
[19:34] <purplefox> fwierzbicki: I didn't import it since I thought I didn't have to if it was fully qualified. (I'm not a python expert ;) )
[19:35] <fwierzbicki> ah - yeah you do need to import it :)
[19:35] <fwierzbicki> even for
[19:35] <fwierzbicki> import java.lang.String
[19:35] <purplefox> fwierzbicki: ok i learnt something new. I would have thought that would be redundant
[19:36] <fwierzbicki> python does all loading through it's import mechanism - a bit of a difference from java
[19:36] <fwierzbicki> that's when things get compiled too
[19:36] <fwierzbicki> if they are out of date
[19:36] <fwierzbicki> (that is if .py is newer than $py.class file in Jython's case)
[19:37] <fwierzbicki> Anyway, glad I could help! Sounded much tougher than it ended up being. I need to discourage importing java packages more loudly somehow
[19:38] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[19:40] <purplefox> fwierzbicki: thanks for your help!
[20:00] * purplefox (~purplefox@host-78-150-4-241.as13285.net) Quit (Ping timeout: 276 seconds)
[20:00] * duri (mduregon@c-71-59-250-251.hsd1.or.comcast.net) Quit (Quit: leaving)
[20:16] * purplefox (~purplefox@host-78-150-4-241.as13285.net) has joined #jython
[20:27] * thereisnospoon_ (~thereisno@27-33-1-87.tpgi.com.au) Quit (Ping timeout: 245 seconds)
[20:40] * thereisnospoon_ (~thereisno@27-33-1-87.tpgi.com.au) has joined #jython
[21:10] * milind (~milind@rrcs-71-42-144-170.sw.biz.rr.com) Quit (Ping timeout: 256 seconds)
[21:15] * milind (~milind@rrcs-71-42-144-170.sw.biz.rr.com) has joined #jython
[21:20] * synasius (~syn@79.143.113.122) has joined #jython
[21:21] * synasius (~syn@79.143.113.122) Quit (Client Quit)
[21:23] * f13o (~f13o@89.101.206.226) Quit (Quit: Leaving)
[22:16] * msavy (~msavy@redhat/jboss/msavy) has joined #jython
[22:55] * purplefox (~purplefox@host-78-150-4-241.as13285.net) Quit (Ping timeout: 276 seconds)
[23:09] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 255 seconds)
[23:33] * milind (~milind@rrcs-71-42-144-170.sw.biz.rr.com) Quit (Ping timeout: 245 seconds)
[23:34] * milind (~milind@rrcs-71-42-144-170.sw.biz.rr.com) has joined #jython
[23:38] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Ping timeout: 248 seconds)
[23:39] * milind (~milind@rrcs-71-42-144-170.sw.biz.rr.com) Quit (Ping timeout: 255 seconds)
[23:40] * enebo_ (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[23:40] * enebo_ (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Client Quit)

Index

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