#jython IRC Log

Index

IRC Log for 2015-10-09

Timestamps are in GMT/BST.

[0:02] * wesclemens (~wesclemen@172.56.12.116) Quit (Ping timeout: 250 seconds)
[0:11] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) Quit (Quit: Leaving)
[1:21] * wesclemens (~wesclemen@mc55036d0.tmodns.net) has joined #jython
[1:29] * wesclemens (~wesclemen@mc55036d0.tmodns.net) Quit (Ping timeout: 264 seconds)
[3:18] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[3:23] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[3:26] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[3:53] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[4:04] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) has joined #jython
[4:56] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[5:07] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[5:17] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) Quit (Ping timeout: 246 seconds)
[8:56] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Ping timeout: 272 seconds)
[9:34] * jorgew (sid36089@gateway/web/irccloud.com/x-vvjhbbumluzlhzia) Quit (Read error: Connection reset by peer)
[9:56] * jorgew (sid36089@gateway/web/irccloud.com/x-ycblldiyiigolypc) has joined #jython
[9:57] * jorgew (sid36089@gateway/web/irccloud.com/x-ycblldiyiigolypc) Quit (Remote host closed the connection)
[10:17] * jorgew (sid36089@gateway/web/irccloud.com/x-glfwassjqtnprkca) has joined #jython
[12:36] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[13:02] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[13:13] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[13:21] * xemdetia (xemdetia@nat/ibm/x-oyknhaenkwznlwqn) has joined #jython
[13:22] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[13:35] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[15:00] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[15:03] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[17:27] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[17:43] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[18:37] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) has joined #jython
[18:46] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[19:40] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[20:20] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[20:29] * fwierzbicki1 (~Adium@99-106-169-5.lightspeed.sntcca.sbcglobal.net) Quit (Quit: Leaving.)
[20:49] * p4xx (~alex@chello062178246207.4.15.vie.surfer.at) has joined #jython
[20:50] * fwierzbicki (~Adium@adsl-99-187-118-182.dsl.pltn13.sbcglobal.net) has joined #jython
[20:53] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) has joined #jython
[21:01] <p4xx> Hello!
[21:01] <p4xx> I want to invoke a Python (http://pastebin.com/SjCDNJb2) function from Java (http://pastebin.com/mSmRVEHx). But I get following error: java.lang.ClassCastException: org.python.core.PySingleton cannot be cast to java.lang.String
[21:01] <p4xx> In Java line 23 throws the exception "s.hello("Test");".
[21:01] <p4xx> I dont know what's wrong. Can someone help me please?
[21:01] <p4xx> Thanks in advance!
[21:04] <agronholm> p4xx: ok, what makes you think you can just cast that PyObject to Hello?
[21:05] <agronholm> I want to understand your train of thought first to correct it
[21:05] <p4xx> it worked without argument, I have actually no idea what I do :), I saw it like that somewhere on stackoverflow
[21:06] <agronholm> have you read the jython book?
[21:06] <p4xx> I have got in touch with jython about 2 hours ago
[21:06] <agronholm> there is a link to the jython book in the topic
[21:07] <p4xx> alright I will have a look
[21:09] <p4xx> but could you give me a hint on how to call a Python with an argument and get the return value within Java?
[21:11] <xemdetia> p4xx, http://www.jython.org/jythonbook/en/1.0/JythonAndJavaIntegration.html#using-jython-within-java-applications
[21:11] <xemdetia> it is in the book fairly verbatim
[21:12] <agronholm> you normally get a function reference and call __call__ on it
[21:12] <agronholm> unless you want to implement Java interfaces
[21:12] <p4xx> great thanks! I can work with that information now! thanks for your help!
[21:20] <p4xx> well, my __call__ needs an PyObject as argument, how would you make "Test" to a PyObject in order to be a valid argument?
[21:24] <xemdetia> p4xx, learn about the things that inherit from PyObject such as in the example code 'PyString'
[21:25] <agronholm> p4xx: there's Py.java2py()
[21:25] <xemdetia> neat I haven't used that
[21:26] <xemdetia> using direct types is too much like my own tried and failed interprets
[21:26] <xemdetia> so it is natural to me
[21:27] <p4xx> nice, now it works, PyString was a good hint
[21:29] <p4xx> Py.java2py() works great, I will use that
[21:44] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) Quit (Remote host closed the connection)
[21:50] * fwierzbicki (~Adium@adsl-99-187-118-182.dsl.pltn13.sbcglobal.net) Quit (Quit: Leaving.)
[21:54] * wesclemens (~wesclemen@c-67-175-165-128.hsd1.il.comcast.net) Quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz???)
[22:01] * xemdetia (xemdetia@nat/ibm/x-oyknhaenkwznlwqn) Quit (Ping timeout: 256 seconds)
[22:37] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) has joined #jython
[23:01] * p4xx (~alex@chello062178246207.4.15.vie.surfer.at) Quit (Quit: Leaving)

Index

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