#jython IRC Log (v0.9)

Index

IRC Log for 2015-03-20

Timestamps are in GMT/BST.

[0:04] * mbooth (~mbooth@redhat/mbooth) Quit (Ping timeout: 265 seconds)
[1:23] * siel (~siel@unaffiliated/motley) Quit (Remote host closed the connection)
[1:30] * siel (~siel@2605:6400:10:c07c:4231:4321:2341:2031) has joined #jython
[1:30] * siel (~siel@2605:6400:10:c07c:4231:4321:2341:2031) Quit (Changing host)
[1:30] * siel (~siel@unaffiliated/motley) has joined #jython
[4:18] * koo6 (~koo5@236.152.broadband3.iol.cz) Quit (Ping timeout: 255 seconds)
[9:03] * mbooth (~mbooth@cpc11-shef10-2-0-cust659.barn.cable.virginm.net) has joined #jython
[9:03] * mbooth (~mbooth@cpc11-shef10-2-0-cust659.barn.cable.virginm.net) Quit (Changing host)
[9:03] * mbooth (~mbooth@redhat/mbooth) has joined #jython
[11:40] * fwierzbicki (~Adium@99-106-169-5.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[11:40] * fwierzbicki (~Adium@99-106-169-5.lightspeed.sntcca.sbcglobal.net) has joined #jython
[12:36] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[12:49] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[13:10] * xemdetia (xemdetia@nat/ibm/x-xfzpvfdloryusnue) has joined #jython
[14:21] <jimbaker> agronholm, i think i came up with a good solution. if site cannot be imported, it returns an ImportError with some detailed diagnostic information. in addition, i fixed one problem where python.home being an empty string would expand to the CWD/Lib, which seems nonsensical
[14:21] <jimbaker> also support for SecurityManager locking things down
[14:22] <jimbaker> and python.import.site property setting
[14:22] <agronholm> jimbaker: ok, is there a solution for webstart then?
[14:22] <jimbaker> so hopefully covers a wide range of scenarios. need to add a few more tests
[14:23] <jimbaker> agronholm, i believe webstart still requires the $py.class files generated for single jar, that's next
[14:23] <agronholm> I mean, will this fix the python.home thing?
[14:23] <jimbaker> but it would be good if you could try out this change with webstart
[14:24] <jimbaker> agronholm, it does a better job of working if python.home is not set
[14:24] <jimbaker> eg if it can find site.py, it should be able to find Lib
[14:24] <agronholm> so given a properly built jython jar, we no longer have to manually set python.home in the web start deployment descriptor?
[14:25] <jimbaker> presumably
[14:25] <jimbaker> but i will need your help testing this aspect out
[14:25] <agronholm> ok
[14:25] <agronholm> should I write a new ant task for building the web start jar?
[14:25] <jimbaker> that sounds like a good idea
[14:26] <agronholm> should the compiled .py files be moved to the root like I do now? or should they now work from the Lib directory?
[14:27] <agronholm> the reason why I had to do that is because jython's own class loader can't find either the source files or the compiled files from the Lib directory
[14:28] <agronholm> bbl
[15:30] <agronholm> expecting guests now, but I'll try to get the ant task done this weekend
[15:30] <agronholm> jimbaker: before that I need to know the answer to my previous question
[15:30] <agronholm> can the class loader now find the modules in the jar's Lib directory?
[15:30] <agronholm> I mean, should it be able to?
[15:31] <agronholm> like you said you'll need my help to confirm it
[16:29] * Trundle (~andy@python/site-packages/trundle) Quit (Remote host closed the connection)
[16:30] * fed007 (~fed007@S0106002191f6c9d8.ed.shawcable.net) has joined #jython
[16:31] <fed007> Hi Jython friends
[16:35] <fed007> Can someone anwser a question about Jython in a JSP?
[16:35] * mike_af (~mike_af@50-77-49-45-static.hfc.comcastbusiness.net) has joined #jython
[16:35] * mike_af (~mike_af@50-77-49-45-static.hfc.comcastbusiness.net) Quit (Changing host)
[16:35] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) has joined #jython
[16:36] <fed007> The question is what is the syntaxt of the opening an closing for a block of python?
[16:36] <fed007> in a JSP?
[16:36] <fed007> the examples show a direct var output as ${ sum }
[16:37] <fed007> but trying to do a full block <% lots of code %> fails
[16:37] <fed007> or even one line...
[16:38] <fed007> so I am guessing using the ' <% ' is not the way to open the python block?
[17:21] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) Quit (Remote host closed the connection)
[17:53] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) has joined #jython
[18:04] * koo6 (~koo5@236.152.broadband3.iol.cz) has joined #jython
[18:08] <jimbaker> agronholm, sounds good about ant task, but we probably will push this out to 2.7.1
[18:08] <jimbaker> fed007, hopefully here someone knows something about JSP
[18:10] <fed007> yeah I am running jython on Tomcat...
[18:10] <fed007> servlets work fine
[18:10] <fed007> and forward to JSP works...
[18:11] <fed007> ${1+2} as vars in JSP work so interpreter is kicking in
[18:11] <jimbaker> does JSP support calling java code? i don't recall its model
[18:11] <fed007> oh for sure it does...
[18:12] <fed007> so it is more about how to open the syntax for writing larger blacks
[18:12] <fed007> blocks...
[18:14] <jimbaker> fed007, i quickly reviewed http://www.jython.org/jythonbook/en/1.0/SimpleWebApps.html#using-jsp-with-jython, and there's nothing here as i understand it
[18:15] <jimbaker> i guess you could use blocks that interact with jython through the java api
[18:15] <jimbaker> you might also have some luck with clamp - https://github.com/jimbaker/clamped
[18:15] <jimbaker> which allows for direct usage of python classes from java code
[18:39] * lopex (uid4272@gateway/web/irccloud.com/x-odesbectjyumxbzt) Quit (Ping timeout: 252 seconds)
[18:51] <jimbaker> agronholm, all set with those changes i was describing earlier with respect to site imports
[19:02] <fed007> hi Jim yeah is more about wriing python/jython
[19:02] <fed007> I have a JSP and I want to put some lines of Jython in it ...
[19:03] <fed007> so scripting jython in a JSP - no calling java...
[19:34] <xemdetia> fed007, did you try this http://www.ibm.com/developerworks/websphere/techjournal/1201_paskin/1201_paskin.html
[19:34] <xemdetia> and you should skip the eclipsy stuff and look more at the first listing
[19:34] <xemdetia> oh nevermind still java in jsp
[19:45] <fed007> I am a JSP pro... :) just new to jython
[19:47] <fed007> so in java/jsp we can display a var into the html page by doing <%=myvar %> in jython jsp it is ${ myvar }
[19:48] <fed007> in JSP we can do multiple lines of code by doing <% line1;line2;line3;.... %>
[19:49] <fed007> in jython how do we wnter multiple lines of code?
[19:49] <fed007> err - enter
[19:49] <fed007> { } does not work
[19:49] <fed007> {% %} does not work
[19:50] <fed007> <{ }> does not work
[19:50] <fed007> I have tried a bunch of ways and have not seen a syntaxt anywhere on the web... everyone just demonstrates a single var.
[19:51] <xemdetia> I mean what I think the problem is that the jsp engine is not designed to accept python
[19:52] <xemdetia> this may be something at the jsp spec level
[19:52] * lopex (uid4272@gateway/web/irccloud.com/x-mvncjifrlanprlrk) has joined #jython
[19:54] <fed007> http://www.jython.org/jythonbook/en/1.0/SimpleWebApps.html
[19:55] <xemdetia> I read that too but there was nothing suggesting you could do what you describe. It makes sense that we could replace the name resolution in jsp pages because that's easy to redefine
[19:56] <xemdetia> I didn't see any code listing there than did <% %>
[19:57] <fed007> I can't believe that the jsp / jython link is only through the request attribute
[19:58] <fed007> jython can be a servlet... JSP is a servlet - compiled
[20:00] <xemdetia> JSP is just a particular style of markup, what I am worried is the issue is the converter. There has to be something that takes JSP and turn it into something meaningful to build a response with. For the code backend because of how jython can do subclassing and all of the jython magic it is totally reasonable to do the stuff that otherwise would normally be java as jython
[20:02] <fed007> yeah that part would be probably harder than the servlet itself to implement for jython...
[20:02] <xemdetia> I mean if you can add a new scriplet that just runs jython
[20:02] <xemdetia> maybe that is possible
[20:03] <fed007> maybe..
[20:03] <fed007> alright thx, I am going to bail on this and god back to python framework
[20:04] <xemdetia> yeah fed007 I think the only way to do it is to create a new custom tag that just does jython things
[20:04] <xemdetia> and that wouldn't be too awful
[20:29] * mbooth (~mbooth@redhat/mbooth) Quit (Ping timeout: 250 seconds)
[20:40] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) Quit (Remote host closed the connection)
[20:43] * mbooth (~mbooth@cpc11-shef10-2-0-cust659.barn.cable.virginm.net) has joined #jython
[20:43] * mbooth (~mbooth@cpc11-shef10-2-0-cust659.barn.cable.virginm.net) Quit (Changing host)
[20:43] * mbooth (~mbooth@redhat/mbooth) has joined #jython
[21:05] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) has joined #jython
[22:03] * mike_af (~mike_af@unaffiliated/mike-af/x-5454762) Quit (Quit: Leaving...)
[22:26] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[23:32] * xemdetia (xemdetia@nat/ibm/x-xfzpvfdloryusnue) Quit (Ping timeout: 252 seconds)

Index

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