#jython IRC Log (v0.9)

Index

IRC Log for 2011-02-28

Timestamps are in GMT/BST.

[0:04] * shanka (~shashank@ucb-np2-199.colorado.edu) Quit (Ping timeout: 276 seconds)
[0:11] * sgithens (~sgithens@cpe-24-166-26-143.indy.res.rr.com) Quit (Ping timeout: 246 seconds)
[0:12] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Quit: jabley)
[0:19] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[0:20] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[0:26] * JStoker (jstoker@unaffiliated/jstoker) Quit (Excess Flood)
[0:32] * JStoker (jstoker@unaffiliated/jstoker) has joined #jython
[0:39] * lopex (lopex@89-76-44-27.dynamic.chello.pl) Quit ()
[0:39] * lopex (lopex@89-76-44-27.dynamic.chello.pl) has joined #jython
[0:42] * sgithens (~sgithens@rrcs-74-218-193-10.central.biz.rr.com) has joined #jython
[0:48] * thijstriemstra (~thijs@h183107.upc-h.chello.nl) has joined #jython
[1:05] * sgithens (~sgithens@rrcs-74-218-193-10.central.biz.rr.com) Quit (Ping timeout: 276 seconds)
[1:46] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[1:51] * sgithens (~sgithens@cpe-24-166-26-143.indy.res.rr.com) has joined #jython
[2:48] * lopex (lopex@89-76-44-27.dynamic.chello.pl) Quit ()
[5:03] * juneau001 (~juneau@pool-70-105-67-6.chi.dsl-w.verizon.net) Quit (Quit: juneau001)
[6:20] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Max SendQ exceeded)
[6:22] * srcerer (~chatzilla@dns2.klsairexpress.com) has joined #jython
[6:55] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) has joined #jython
[6:59] * jankoprowski (~jan.kopro@nat/intel/x-gaxrlbirpohwjcbp) has joined #jython
[7:00] <jankoprowski> Hi
[7:00] <jankoprowski> I'm extending program wrote in Java and I would like add ability to write code snippets in jython
[7:01] <jankoprowski> to do this I need attach jython to this project
[7:01] <jankoprowski> How I can do this?
[7:01] <jankoprowski> How I can attach jython as programming language to java project?
[7:02] * jabley_ (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) has joined #jython
[7:05] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Ping timeout: 240 seconds)
[7:05] * jabley_ is now known as jabley
[7:12] * malthe|away is now known as malthe
[7:24] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Quit: jabley)
[7:26] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) has joined #jython
[8:30] * thijstriemstra (~thijs@h183107.upc-h.chello.nl) Quit (Ping timeout: 250 seconds)
[9:16] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Quit: jabley)
[9:31] <malthe> jankoprowski, I think they're mostly us-based here, so haven't woken up yet.
[9:40] <agronholm> jankoprowski: you haven't told us what IDE you are using.
[9:40] <agronholm> then you have two options: the JSR-223 interface or PythonInterpreter
[9:41] <agronholm> you should install jython as a standalone installation if you wish to distribute such applications too
[9:41] <agronholm> the standalone installation gives you a complete .jar with the standard library included
[9:54] * pr3d4t0r (~cu4cu4@varenka.cime.net) Quit (Quit: WeeChat 0.2.6)
[9:56] * pr3d4t0r (~cu4cu4@varenka.cime.net) has joined #jython
[10:00] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) has joined #jython
[10:40] <jankoprowski> agronholm: Eclipse
[10:40] <jankoprowski> I've almost done
[10:54] * juneau001 (~juneau@pool-70-105-67-6.chi.dsl-w.verizon.net) has joined #jython
[11:30] * lopex (531346b2@gateway/web/freenode/ip.83.19.70.178) has joined #jython
[11:49] * malthe is now known as malthe|away
[12:20] <jankoprowski> Now I'm stacked
[12:20] <jankoprowski> I create PythonInterpreter instance
[12:20] <jankoprowski> and execute Jython code by "exec"
[12:21] <jankoprowski> But I would like jar file import for me some modules
[12:21] <jankoprowski> and make the available
[12:21] <jankoprowski> I try __run__.py but it doesn't work in this case
[12:21] <jankoprowski> Am I able to modify jar to make some imports on the beginning?
[12:34] <agronholm> what is your entry point to the jar?
[12:37] <jankoprowski> Hmmm
[12:37] <jankoprowski> new PythonInterpreter() :)
[12:38] <jankoprowski> nothig more
[12:38] <jankoprowski> agronholm: :)
[12:38] <agronholm> a java class then
[12:38] <agronholm> to make use of __run__.py, you should have a different entry point
[12:39] <jankoprowski> Ok
[12:39] <jankoprowski> so Main.java?
[12:39] <agronholm> uh, no
[12:39] <agronholm> isn't this documented?
[12:39] <jankoprowski> You talk about this: http://goo.gl/KH5bB ?
[12:40] <agronholm> no
[12:40] <jankoprowski> So I don't know. I didn't find anything
[12:40] <agronholm> this is what came up in a 5 second google search
[12:40] <agronholm> http://wiki.python.org/jython/JythonFaq/DistributingJythonScripts
[12:40] <jankoprowski> which part?
[12:41] <agronholm> "Using the Jar Method"
[12:41] <agronholm> so to use __run__.py, your entry point should be declared as org.python.util.jython
[12:42] <jankoprowski> Hmmm
[12:42] <jankoprowski> But I didn't run Java
[12:43] <jankoprowski> I'm writing plugin to another program to be able to execute Jython code inside
[12:43] <agronholm> you can't run python apps without running Java.
[12:43] <agronholm> err, you can't use jython without running java
[12:43] <jankoprowski> agronholm: I create new PythonInterpreater()
[12:43] <jankoprowski> how set entry point making this.
[12:43] <jankoprowski> ?
[12:44] <agronholm> so use PythonInterpreter and exec() or eval() code with that
[12:44] <agronholm> what's the problem?
[12:44] * r0bby (~wakawaka@guifications/user/r0bby) has joined #jython
[12:46] * jankoprowski hate explaining something complicated on IR
[12:46] <jankoprowski> so ...
[12:46] <jankoprowski> I write plugin and I dream to make it public
[12:46] <agronholm> what's stopping you?
[12:47] <jankoprowski> This pluggin assume You have Your own jython.jar modified which fit Your needs
[12:47] <agronholm> so, just add that to the classpath?
[12:47] <jankoprowski> Yeap.
[12:47] <jankoprowski> And this is easy in this software
[12:47] <jankoprowski> This is QuickBuild by the way
[12:47] <agronholm> never heard
[12:48] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 276 seconds)
[12:48] <jankoprowski> http://www.pmease.com/ - If You need some build machine like CruiseControl or Hudson - this is really impressing build system I ever seen
[12:48] <jankoprowski> backing to the topic
[12:49] <jankoprowski> I just need - but only in my case - to create some functions and make them available on start
[12:49] <jankoprowski> but this is "my situation" and I can't release plugin with such functions
[12:49] <jankoprowski> I will be forced to encode them somewhere in plugin code
[12:49] <jankoprowski> *keep them somewhere in plugin code
[12:50] <agronholm> what's the problem with that?
[12:50] * malthe|away (~malthe@e179015029.adsl.alicedsl.de) Quit (Ping timeout: 240 seconds)
[13:03] * jankoprowski (~jan.kopro@nat/intel/x-gaxrlbirpohwjcbp) Quit (Ping timeout: 240 seconds)
[13:04] * malthe (~malthe@e179004026.adsl.alicedsl.de) has joined #jython
[13:12] * yacc (~andreas@84.113.164.165) has joined #jython
[13:51] * jankoprowski (~jan.kopro@nat/intel/x-tgnqoewetjgqjilw) has joined #jython
[14:00] <jankoprowski> agronholm: Sorry - I was disconnected
[14:00] <jankoprowski> agronholm: The problem is I can't import module which doesn't exists
[14:00] <agronholm> uhh
[14:00] <agronholm> why should you be able to import nonexistent modules?
[14:00] <jankoprowski> agronholm: and exists only in my, modified jython.jar
[14:01] <jankoprowski> agronholm: because standard person which download it should be able to work with this plugin with plain jython.jar
[14:01] <agronholm> so package it in its own jar then?
[14:02] <agronholm> jython can load modules from anywhere in the class path, but only if there are no java classes in the same directory
[14:05] * sgithens (~sgithens@cpe-24-166-26-143.indy.res.rr.com) Quit (Ping timeout: 250 seconds)
[14:05] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) Quit (Quit: jabley)
[14:09] <jankoprowski> agronholm: But how force them to import anything when I create PythonInterpreter instance?
[14:10] <agronholm> why does that have to happen automatically? just create PythonInterpreter and then use exec() to import the module
[14:10] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) has joined #jython
[14:11] <jankoprowski> I can't\
[14:12] <jankoprowski> I need something which work inside JAR
[14:12] <jankoprowski> not in code
[14:12] <agronholm> you're not making any sense.
[14:13] <agronholm> you want impossible things and you can't even properly explain your needs.
[14:34] * gqlewis (~gqlewis@h246.70.82.166.dynamic.ip.windstream.net) has joined #jython
[14:34] <jankoprowski> I still try to explain You but You can't understand.
[14:35] <jankoprowski> Probably telephone will be the only way to explain why I need such thing
[14:35] <jankoprowski> And IMHO the problem is there is no __run__.py equivalent for PythonInterprter
[14:35] <jankoprowski> not in fact I expect there will be something like this
[14:36] <agronholm> your code must have some point in it where it does PythonInterpreter()
[14:36] <agronholm> why could it not execute some code after that?
[14:37] <jankoprowski> I already told You - becaue this code will be release and I can't do anything specific for only my environemt
[14:37] <agronholm> the code being released has nothing to do with this by itself.
[14:38] <agronholm> and what environment are you talking about
[14:38] <jankoprowski> the code being released has everything to do with this by itself.
[14:39] <jankoprowski> I just can't import library which won't be available inside "jython.jar" in client
[14:40] <agronholm> in your post to the mailing list you say that jruby has a container.parse()
[14:40] <agronholm> and Jython has compile()
[14:41] <agronholm> you didn't ask me about those for some reason
[14:41] <jankoprowski> agronholm: Because this is less important and I can wait with answer on this
[14:42] <agronholm> what does "this" refer here?
[14:42] <jankoprowski> Way how simplify my implementation are less importand that how make "by default" available some functions
[14:43] <agronholm> from what I understand so far, you can't use a custom jython.jar here, and you can't put modules anywhere else on the class path and you can't execute code manually either
[14:43] <agronholm> that doesn't leave any options
[14:43] <jankoprowski> I can use custom jython.jar on my development machine
[14:43] <jankoprowski> I can't assume user on their machine use custom jython.jar
[14:44] <agronholm> where will they get it from then?
[14:44] <jankoprowski> I can do anything inside jython.jar to make available some additional functions/variables/anything on startup
[14:44] <agronholm> I have no idea how you're even deploying this application
[14:44] <jankoprowski> Is this really matte?
[14:44] <jankoprowski> *matter?
[14:44] <agronholm> yes
[14:47] <jankoprowski> so I must gave up and accept this is impossible today.
[14:47] <agronholm> or you could just explain to me
[14:48] <agronholm> you still haven't told me how this application is distributed and deployed
[14:49] <jankoprowski> This is "Plug-in Project" in Eclipse
[14:49] <jankoprowski> This project have one class with method which receive Java String
[14:49] <jankoprowski> This string contain Jython code to execute
[14:49] <jankoprowski> I create PythonInterpreter
[14:50] <jankoprowski> and run which is in the code
[14:50] <jankoprowski> interp is PythonInterpreter instance
[14:50] <jankoprowski> I'm trying interp.compile(expression).call(PyFrame)
[14:50] <agronholm> PyFrame??
[14:50] <jankoprowski> Yeap - call have one parameter
[14:50] <jankoprowski> to be execute
[14:50] <jankoprowski> and I don't know what pass as this parameter
[14:51] <jankoprowski> becase compile(expression).call()
[14:51] <jankoprowski> doesn't work :|
[14:51] <jankoprowski> There is no such method
[14:51] <agronholm> __call__
[14:51] <jankoprowski> ?
[14:52] <jankoprowski> Hmmm
[14:52] <jankoprowski> ooo
[14:52] <jankoprowski> w8 a moment
[14:52] <jankoprowski> I probably get it
[14:52] <jankoprowski> interp.compile(expression)() ?
[14:52] * sgithens (~sgithens@149-166-135-236.dhcp-in.iupui.edu) has joined #jython
[14:52] <agronholm> huh?
[14:53] <jankoprowski> interp.compile(expression).__call__()?
[14:53] <agronholm> yes
[14:53] <jankoprowski> I will check it works :)
[14:54] <jankoprowski> 'tablecode' object is not callable
[14:55] <jankoprowski> This is the error :|
[14:55] <jankoprowski> I will start googling it
[14:55] <agronholm> normally you just exec() the code
[14:55] <agronholm> is that impossible in your case for some reason?
[14:56] <jankoprowski> Not exactly
[14:57] <jankoprowski> I "exec" everything
[14:57] <agronholm> why do you specifically want to compile() it then?
[14:57] <jankoprowski> except line
[14:57] <jankoprowski> because I need return "something" from my method
[14:57] <jankoprowski> and only eval return result of expression
[14:57] <agronholm> then use eval()
[14:57] <agronholm> you can use both
[14:57] <jankoprowski> But eval doesn't work with multine string
[14:58] <jankoprowski> after I saw how jRuby work this I start looking something more elegant in Jython
[14:58] <agronholm> so first use exec() and then eval()
[14:58] <jankoprowski> I do this already
[14:58] <agronholm> what's the problem then
[14:58] <jankoprowski> But I just looking something more elegant as I said
[14:59] <jankoprowski> something which will simplify implementation
[14:59] <agronholm> how is that more elegant?
[15:00] <agronholm> you still need eval() if you want to get a return value
[15:00] <jankoprowski> unfortunately :( I tought compile and then call work fine
[15:01] <jankoprowski> But I still don't know how to get PyFrame object to pass
[15:01] <jankoprowski> Here is my workaround to __run__.py which isn't bootstrap when PythonInterpreter is created http://pylonshq.com/pasties/ae7952cc9268604562e604fc91f718e5
[15:02] <jankoprowski> But this looks terrible
[15:16] <jankoprowski> Buy
[15:16] <jankoprowski> Thanks for conversation
[15:16] * jankoprowski (~jan.kopro@nat/intel/x-tgnqoewetjgqjilw) has left #jython
[15:21] * r0bby (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 260 seconds)
[15:21] <agronholm> what did he want me to buy?
[16:18] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Ping timeout: 246 seconds)
[17:09] * lopex (531346b2@gateway/web/freenode/ip.83.19.70.178) Quit ()
[17:11] * lopex (lopex@89-76-44-27.dynamic.chello.pl) has joined #jython
[17:38] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[17:51] * malthe is now known as malthe|away
[17:59] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) Quit (Quit: jabley)
[18:15] * sgithens (~sgithens@149-166-135-236.dhcp-in.iupui.edu) Quit (Ping timeout: 240 seconds)
[18:18] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[18:19] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Client Quit)
[18:21] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[18:39] * jankoprowski (594d03ea@gateway/web/freenode/ip.89.77.3.234) has joined #jython
[18:39] <jankoprowski> Hi.
[19:06] * malthe|away is now known as malthe
[19:13] * malthe is now known as malthe|away
[19:27] * sgithens (~sgithens@149-166-135-236.dhcp-in.iupui.edu) has joined #jython
[19:35] * jankoprowski (594d03ea@gateway/web/freenode/ip.89.77.3.234) Quit (Quit: Page closed)
[19:41] * potatodemon (~josh@38.110.159.162) has joined #jython
[19:42] <potatodemon> Howdy Y'all. I need to obobscure some Python code. What would be a good way to do that with jython?
[20:10] * jankoprowski (594d03ea@gateway/web/freenode/ip.89.77.3.234) has joined #jython
[20:11] <jankoprowski> Hi. Why this doesn't return 125? http://pylonshq.com/pasties/da2206c74b865f554e147a04a0012662
[20:11] <jankoprowski> But print "None"?
[20:23] * jankoprowski (594d03ea@gateway/web/freenode/ip.89.77.3.234) has left #jython
[20:31] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) has joined #jython
[20:39] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[20:55] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Quit: jabley)
[20:59] * potatodemon (~josh@38.110.159.162) Quit (Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/)
[21:14] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[21:26] * gqlewis (~gqlewis@h246.70.82.166.dynamic.ip.windstream.net) Quit (Quit: gqlewis)
[21:32] <agronholm> was it not you who told me that eval() didn't support multiline statements?
[21:32] <agronholm> ah damn he left
[22:19] * sgithens (~sgithens@149-166-135-236.dhcp-in.iupui.edu) Quit (Ping timeout: 250 seconds)
[22:23] * lucian_ (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[22:24] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Ping timeout: 240 seconds)
[22:39] * r0bby (~wakawaka@guifications/user/r0bby) has joined #jython
[22:52] * gqlewis (~gqlewis@h246.70.82.166.dynamic.ip.windstream.net) has joined #jython
[22:59] * cschneid (~cschneid@c-76-120-122-74.hsd1.co.comcast.net) Quit (Ping timeout: 240 seconds)
[23:01] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Ping timeout: 240 seconds)
[23:01] * clajo04_ (~clajo04_@pool-74-108-95-175.nycmny.fios.verizon.net) Quit (Ping timeout: 240 seconds)
[23:01] * juneau001 (~juneau@pool-70-105-67-6.chi.dsl-w.verizon.net) Quit (Ping timeout: 240 seconds)
[23:01] * JStoker (jstoker@unaffiliated/jstoker) Quit (Ping timeout: 240 seconds)
[23:01] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 240 seconds)
[23:01] * JythonLogBot (~PircBot@74.50.59.201) Quit (Ping timeout: 240 seconds)
[23:01] * JythonLogBot disconnected - trying to reconnect...
[23:01] -barjavel.freenode.net- *** Looking up your hostname...
[23:01] -barjavel.freenode.net- *** Checking Ident
[23:01] -barjavel.freenode.net- *** Couldn't look up your hostname
[23:01] -barjavel.freenode.net- *** No Ident response

Index

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