#jython IRC Log


IRC Log for 2015-03-24

Timestamps are in GMT/BST.

[0:03] * fwierzbicki (~Adium@99-106-169-5.lightspeed.sntcca.sbcglobal.net) Quit (Quit: Leaving.)
[0:36] * fwierzbicki (~Adium@adsl-71-134-235-85.dsl.pltn13.pacbell.net) has joined #jython
[1:08] <houseboat> i have a question
[1:08] <houseboat> "Although you can ask the Java SDK to give you a list of all of the packages known to a ClassLoader using:"
[1:08] <houseboat> java.lang.ClassLoader#getPackages()
[1:09] <houseboat> what is the # there?
[1:10] <houseboat> it looks like a commenet to me
[1:10] <houseboat> it also works in the jython console as a comment
[1:10] <houseboat> how do comments list all known packages?
[1:12] <houseboat> is this a bug in the documentation
[1:13] <houseboat> AttributeError: type object 'java.lang.ClassLoader' has no attribute 'getPackages'
[1:29] * fwierzbicki (~Adium@adsl-71-134-235-85.dsl.pltn13.pacbell.net) Quit (Quit: Leaving.)
[3:00] * fwierzbicki (~Adium@99-106-169-5.lightspeed.sntcca.sbcglobal.net) has joined #jython
[5:52] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:31] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 264 seconds)
[8:39] * ohumbel (5390f784@gateway/web/freenode/ip. Quit (Quit: Page closed)
[8:44] * ohumbel (5390f784@gateway/web/freenode/ip. has joined #jython
[9:09] <mbooth> houseboat: This means "getPackages()" is a method on the class "ClassLoader"
[9:11] <mbooth> The # is just the "javadoc" syntax of representing such -- you are not meant to literally copy that in
[10:24] * houseboat (~koo5@236.152.broadband3.iol.cz) Quit (Ping timeout: 264 seconds)
[13:25] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[13:53] * xemdetia (xemdetia@nat/ibm/x-gvjxotsbessfkkpi) has joined #jython
[14:52] * meflin (~meflin@c-107-2-144-171.hsd1.co.comcast.net) has left #jython
[15:47] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) has joined #jython
[15:53] * fed007_ (~fed007@S0106002191f6c9d8.ed.shawcable.net) has joined #jython
[15:56] * fed007 (~fed007@S0106002191f6c9d8.ed.shawcable.net) Quit (Ping timeout: 255 seconds)
[17:14] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[17:30] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Quit: ChatZilla [Firefox 36.0.1/20150305021524])
[18:29] * srcerer (~chatzilla@dns2.klsairexpress.com) has joined #jython
[18:32] * houseboat (~koo5@236.152.broadband3.iol.cz) has joined #jython
[18:36] <houseboat> mbooth, i see, thanks, and why doesnt getPackages exist, in 2.5 neither in 2.7, only getPackage?
[18:38] <mbooth> houseboat: This is a java method not a python method -- so I don't know. It has been present in Java since Java 1.2. See: http://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html#getPackages--
[18:39] <mbooth> houseboat: AFAIK, you can call any java method from within jython, no?
[18:42] <houseboat> i thought that was the idea, yeah
[18:44] <mbooth> I don't know how to create python subclasses of Java classes, so I can't help further -- sorry :-(
[18:45] <houseboat> afaik thats easy, class xxx(java class) ?
[18:49] <houseboat> its the java side of things that makes me want to commit seppuku
[18:49] <mbooth> houseboat: I just tried it -- it works for me
[18:49] <mbooth> http://fpaste.org/202255/72229471/
[18:50] <mbooth> You get different results?
[18:52] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[18:55] <houseboat> what _ the _ hell
[18:55] <houseboat> no, that works
[18:55] <houseboat> what the hell
[18:56] <houseboat> apparently i still dont understand anything of jython
[18:56] <mbooth> :-)
[18:56] <mbooth> Yeah it's mostly magic, I'm fairly sure
[18:57] <houseboat> haha
[18:58] <mbooth> houseboat: Were you trying to call it without subclassing first? Java has strict visibility rules and this method is "protected"
[18:58] <houseboat> yes
[18:58] <houseboat> i see
[19:00] <houseboat> i was trying to call it on the class directly
[19:01] <mbooth> Sure, that makes sense as to why it did not work then
[19:02] <mbooth> I have the opposite problem
[19:02] * mbooth is a java guy, not a python guy :-p
[19:03] <houseboat> i think i will have to just clench my teeth and learn more java first, these alternative jvm languages dont seem a good way to contribute code to a java project
[19:03] <houseboat> if its about python, i might be able to help
[19:03] <mbooth> I mean generally, in terms of understanding the jython magic :-)
[19:03] <houseboat> :)
[19:08] <agronholm> ClassLoader.getPackages() is a protected method
[19:08] <houseboat> apparently
[19:08] <agronholm> https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html#getPackages()
[19:21] <houseboat> first i didnt understand that what has to be on the classpath are individual jars themselves, not just..you know, a path
[19:27] <agronholm> or you could add /the/path/*
[19:31] <houseboat> sounds right:)
[19:38] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[21:44] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[21:48] * paolo (~paolo@unaffiliated/paolo) Quit (*.net *.split)
[21:49] * paolo (~paolo@unaffiliated/paolo) has joined #jython
[21:57] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) Quit (Quit: Leaving...)
[23:04] * houseboat is now known as sirhouseboat
[23:22] * xemdetia (xemdetia@nat/ibm/x-gvjxotsbessfkkpi) Quit (Ping timeout: 265 seconds)
[23:58] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 264 seconds)


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