#jython IRC Log


IRC Log for 2013-10-29

Timestamps are in GMT/BST.

[0:30] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 246 seconds)
[1:07] <jimbaker> peke, potentially we could create a windows installer like this in terms of py2exe type approaches
[1:07] <agronholm> py2exe and the lot don't create installers though
[1:08] <jimbaker> sure, but this could be used by the installer...
[1:08] <jimbaker> there's also some mechanism that setuptools uses for creating exe's
[1:09] <agronholm> iirc py2exe is really the wrong tool for this
[1:09] <jimbaker> agronholm, ok
[1:09] <agronholm> *imho
[1:09] * shashank1 (~shashank@ Quit (Quit: Leaving.)
[1:09] * shashank (~shashank@ has joined #jython
[1:26] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) has joined #jython
[1:33] <vIkSiT> hello all
[1:34] <vIkSiT> looks like in jython, overriding a method in a different file isn't taken up by default?
[1:34] <vIkSiT> is tehre something specific about method overriding that should be kept in check?
[1:44] * sinsnare|away is now known as sinistersnare
[1:46] <agronholm> vIkSiT: I'm not following
[1:47] <vIkSiT> here's what happened - i have a casasndra python driver which contains a class x. one of the methods of that class, m does something funny in my env.
[1:47] <vIkSiT> so i create a new class y(x) and re implement m() as a noop
[1:47] <vIkSiT> except, this isn't honored
[1:48] <agronholm> can you reproduce that in a standalone script?
[1:49] <vIkSiT> Hmm
[1:49] <vIkSiT> Could try
[1:49] <agronholm> being in separate modules has no bearing to the method resolution order
[2:24] * whg is now known as zz_whg
[3:04] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) Quit (Quit: This computer has gone to sleep)
[3:38] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[5:24] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) has joined #jython
[5:39] * Oti (~ohumbel@adsl-178-39-179-157.adslplus.ch) has joined #jython
[5:42] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) Quit (Quit: This computer has gone to sleep)
[6:01] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) has joined #jython
[6:29] * thereisnospoon_ (~thereisno@27-33-1-87.tpgi.com.au) Quit (*.net *.split)
[6:35] * thereisnospoon_ (~thereisno@27-33-1-87.tpgi.com.au) has joined #jython
[6:37] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:02] * Oti (~ohumbel@adsl-178-39-179-157.adslplus.ch) Quit (Quit: Oti)
[7:30] <daenney> peke: jimbaker: Tbh, I have no intention of supporting CPython 2.6 :) But if people want we could eventually try to support it. The main reason I don't like it is because of optparse vs argparse
[7:31] <daenney> peke: jimbaker: argparse needs to be used/supported anyway if we want to keep that script around for Jython 3.x
[7:37] <daenney> jimbaker: I'll try and fix find_jython today, there's a bit too much branching and things going on in that
[8:38] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 240 seconds)
[8:58] <peke> daenney: optparse is still around in python 3. was deprecated in 3.2 but i doubt it's actually removed any time soon.
[9:00] <peke> but if you absolutely don't want to touch it, i can do that. i work with customers that use redhat releases that don't have py27. forcing them to compile py27 just to use jython would be quite annoying.
[9:00] <daenney> Actually, it's been deprecated in 2.7
[9:01] <daenney> But I think the use case for Jython is simple enough that switching out optparse with argparse is probably easily done
[9:01] <daenney> I could probably even check for pyversion and switch based on that
[9:01] <peke> yes, it's been deprecated both in 2.7 and 3.2. no argparse in 3.0 or 3.1.
[9:01] <daenney> Yeah but PYthon 3.0 and 3.1 really don't count anymore. If you're on 3 you should be on 3.2+
[9:02] <peke> daenney: totally agree. and would actually go further saying you should be in 3.3. but argparse being introduced only in 3.2 would indicate optparse is not likely to be removed in py3.
[9:03] <daenney> True
[9:03] <daenney> I'll see what I can do
[9:03] <daenney> I was under the impressions they actually removed optparse from 3 altogether, so that changes things
[9:03] <peke> conditionally using optparse or argparse wouldn't thus save much. still need to handle optparse, and handling argparse adds more stuff to test.
[9:05] <peke> i do agree that this script should support py3 too. or at least be implemented so that parting is easy.
[9:06] <peke> based on what i've read, supporting 2.6, 2.7 and 3.3 ought to be rather easy even in large programs. 2.5 is problematic because you cannot do `except Exception as e`. 3.2 is problematic because it doesn't support u'stuff'.
[9:07] <peke> in a rather simple script like this, those limitations don't necessarily matter too much.
[9:10] <peke> daenney: anyway, i totally understand if supporting older python versions annoys you. let me know if it gets too annoying and i can help. that is pretty important in my jython use cases and would likely save me from many headaches in the future.
[9:11] <daenney> Sure, I'll see what I run into and get back to you
[9:12] <peke> daenney: great!
[9:14] <peke> daenney: are you interested in discussing start-up on windows at some point? as i wrote earlier, cannot expect users to have cpython there and there python files must have the `.py` prefix.
[9:15] <daenney> peke: Well, CPython on Windows is really ease, just run the msi. I agree we can't always expect them to have it but we could mention it
[9:16] <daenney> peke: I don't have a Windows machine or access to it though so there's preciously little I can do. The last time I did bat-scripting is more than half a decade ago
[9:16] <peke> jimbaker: like agronholm, i have an impression that py2exe wouldn't work too well for creating a windows launcher. and i'm afraid setuptools related solutions would also require cpython.
[9:16] <daenney> peke: My guts would also say that the whole bat-script would need to go PowerShell but I've never touched that before
[9:17] <peke> daenney: first of all, i really, really dislike windows. unfortunately it is an important platform for my clients. thus having a solution that is easy for them would be very convenient to me.
[9:17] <daenney> :)
[9:18] * jarekps (~jsmiejcza@office.clearcode.cc) has joined #jython
[9:19] <peke> daenney: jimbaker: due to above reasons, looking at ways to make the windows start-up script convenient for end users is something i can look at.
[9:20] <peke> one thing that is for sure is that it cannot be jython.bat. powershell apparently would be better but all users don't have it either.
[9:22] <peke> anyway, i can investigate possible options and let you know if i find something that looks good.
[9:29] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) Quit (Quit: This computer has gone to sleep)
[9:31] <daenney> Yeah but come on, PowerShell can be installed as far back is Windows XP and Server 2k3
[9:31] <daenney> I draw the line there
[9:31] <daenney> If they can't be bothered to get that done then just use the old jython.bat for as long as that works :/
[9:32] <daenney> However, if you get paid for the weeks of additional effort it might take you to get it working across powershell and cmdlet then by all means :)
[10:00] * valtih (~chatzilla@sushi.pld.ttu.ee) has joined #jython
[10:00] <valtih> how do I create a new java.String?
[10:33] <daenney> java.lang.String, I assume, is a normal python string in Jython, they map to eachother
[10:33] <daenney> but if you want, 'from java.lang import String; a = String('a')' should do it I think
[12:09] <peke> daenney: the problem with installing powershell is that i would need to document it. end users i'm thinking are very non-technical. i would rather spent time developing jython.exe that just works.
[12:11] <daenney> Lets agree to have a philosophical difference about that then.
[12:14] <peke> sure. and i totally understand you don't want to spent time with stuff like that.
[12:16] <peke> you scratch your own itch. and i scratch mine. =)
[12:16] <daenney> But what kind of users are you thinking of? I can't imagine that many people without any technical know-how getting into Jython
[12:18] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 248 seconds)
[12:22] <peke> daenney: i'm a developer of this test automation framework http://robotframework.org
[12:22] <peke> lot of our end users are very non-technical
[12:23] <peke> they may not, for example, have any idea what an environment variable is. that's why our installation instructions contain stuff like this: http://code.google.com/p/robotframework/wiki/Installation#Setting_PATH
[12:53] * chro (~Magma@unaffiliated/chrome/x-455334) has joined #jython
[12:53] <chro> hi
[12:53] <chro> Can I pass a properties file like this: ~/jython-2.7/bin/jython -Dlog4j.configuration=resources/log4j.properties tpcc.py
[12:53] <chro> ?
[12:54] <daenney> No, currently bin/jython only accepts -J to pass arguments to the JVM, I think
[12:54] <daenney> Have a look at bin/jython --help
[12:58] <chro> so I can replace -D by -J
[13:19] <chro> tks
[13:19] * chro (~Magma@unaffiliated/chrome/x-455334) Quit (Quit: Leaving)
[13:28] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[13:30] * zz_whg is now known as whg
[14:02] <peke> jimbaker: how should possible jython.exe, and jython.py, find jython.jar? /cc daenney
[14:02] <daenney> peke: Right now jython.py looks if it can find jython.jar/jython-dev.jar in the same directory as jython.py or in the parent
[14:02] <peke> if i understand the current jython shell script, and daenney's jython.py, JYTHON_HOME has precedence over the directory where the script is located.
[14:03] <daenney> Yes, JYTHON_HOME is considered more important seeing as that would be manually set by someone in their environment
[14:03] <daenney> But jython.py is checking for good meassure if jython.jar or jython-dev.jar is found within JYTHON_HOME and if not tells the user to fix that
[14:05] <peke> doesn't that mean that if you have JYTHON_HOME set to one jython installation, running jython.py under some other jython installation will execute the other?
[14:05] <daenney> Yup
[14:05] <peke> isn't that wrong?
[14:05] <daenney> But there's no way to reliably detect that
[14:05] <peke> why not to first check is there jython.jar on the same directory as the script?
[14:06] <daenney> I could, still doesn't solve your issue, what if it's not there nor in the parent, then we'll still default to JYTHON_HOME and again end up calling the wrong jython installation
[14:07] <daenney> Argueably the change of that happening is less than the other way around but still possible
[14:07] <peke> i would assume that in most cases jython script and jython.jar _are_ in the same directory. i would assume there are after a normal installation at least.
[14:07] <daenney> Well, they're not, for exmaple, on a Mac
[14:07] <daenney> it bin/jython.sh and libexec/jython.jar
[14:08] <peke> oh, didn't know that. annoying. how did you install jython there+
[14:08] <daenney> Actually, it libexec/bin/jython.sh
[14:08] <daenney> SO that's why I'm searching the parent too
[14:08] <daenney> brew install jython
[14:08] <daenney> Like most mac developers will
[14:08] <peke> i see. i've always installed jython using the provided installer. there was no brew when i used osx.
[14:09] <daenney> It's easily fixed by also serching the parent directory of where jython.py is located
[14:09] <daenney> But it still doesn't solve the multiple jython installation issues
[14:09] <daenney> I can prioritise searching directories over JYTHON_HOME but there's no guarantee that will always work
[14:10] <peke> doesn't it? if jython.jar is found in the same directory as jython script, or in its parent, under normal installation, regardless the os?
[14:10] <daenney> Yes, if
[14:10] <daenney> But what if it's not?
[14:11] <daenney> You'd still get undefined behaviour based on JYTHON_HOME
[14:11] <peke> true. but i think even that is better than the current situation. i've actually been bitten by the current functionality few times. very annoying.
[14:12] <daenney> Ha, yeah. I can change it easily enough, I doubt there's any harm in it
[14:12] <daenney> In the majority of the use cases it would work just fine
[14:13] <peke> yeah. and if you get that script into 2.7b2 there's plenty of time to test it before the final release.
[14:14] <peke> finding jython.jar in the normal installation case can be easily enhanced.
[14:15] <peke> having JYTHON_HOME as the fallback is probably a good idea anyway. it both works as a workaround for strange intallations and allows one to create a custom script based on the original and have it somewhere else than the standard location.
[14:16] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Max SendQ exceeded)
[14:17] <peke> the reason i'm asking this is that i'm prototying how hard it would be to create jython.exe using autoit <http://autoitscript.com>. looks pretty good so far, especially now that i found autoit implementation of getopt.
[14:20] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[14:22] <daenney> Oh lol, autoit, blast from my past. That was 8 years ago
[14:23] <peke> daenney: yes, lol. it is bad in so many levels, but being able to compile the script to stand-alone exe is pretty darn convenient.
[14:24] <peke> and that horrible language beats batch files.
[14:31] * valtih (~chatzilla@sushi.pld.ttu.ee) Quit (Remote host closed the connection)
[14:48] <peke> daenney: should java in PATH or have precedence over java in JAVA_HOME? or does that even matter? if the latter is set, i would assume it typically points to the former.
[14:49] <daenney> peke: Yes, my assumption is that if JAVA_HOME is set it's pointing to the java version you want to and that usually is the same version you get for java form path
[14:50] <daenney> However giving JAVA_HOME precedence allows you to override the java version you might want to use during the command invocation instead of assuming the one in $PATH is what users want
[15:42] * sinsnare (cddef8b0@gateway/web/freenode/ip. has joined #jython
[16:26] * sinsnare (cddef8b0@gateway/web/freenode/ip. Quit (Quit: Page closed)
[17:03] * Oti (~ohumbel@adsl-178-39-179-157.adslplus.ch) has joined #jython
[17:06] * mcurve (~quassel@pop.nakinasystems.com) Quit (Read error: Operation timed out)
[17:39] * jarekps (~jsmiejcza@office.clearcode.cc) Quit (Quit: jarekps)
[18:35] * mcurve (~quassel@pop.nakinasystems.com) has joined #jython
[18:53] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[18:58] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) has joined #jython
[19:18] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) Quit (Quit: This computer has gone to sleep)
[19:20] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) Quit (Quit: leaving)
[19:22] * maxb (maxb@skeeter-mxisp.mxtelecom.com) has joined #jython
[19:29] * valtih (~chatzilla@sushi.pld.ttu.ee) has joined #jython
[19:30] <valtih> I see in stackoverflow that I need "%.3f" % [javaObject.getDouble()] to format the precision digits. But, it produces `TypeError: float argument required`. How do I handle doubles?
[19:41] <daenney> d instead of f?
[19:48] <valtih> Acutally, python expects a tuple of (java) objects rather than list of (python) floats. That is, "%.3f" % (javaObject.getDouble()) works perfectly.
[20:02] * vIkSiT (~vIkSiT|2@50-0-250-34.dedicated.static.sonic.net) has joined #jython
[20:02] * vIkSiT (~vIkSiT|2@50-0-250-34.dedicated.static.sonic.net) Quit (Changing host)
[20:02] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) has joined #jython
[20:16] * cameron__ (~thereisno@27-33-1-87.tpgi.com.au) has joined #jython
[20:18] * thereisnospoon_ (~thereisno@27-33-1-87.tpgi.com.au) Quit (Ping timeout: 265 seconds)
[20:25] * bru` (~bruno`@AMontsouris-652-1-82-148.w92-163.abo.wanadoo.fr) Quit (Ping timeout: 245 seconds)
[20:34] * bru` (~bruno`@AMontsouris-652-1-34-245.w83-202.abo.wanadoo.fr) has joined #jython
[20:41] * bru` (~bruno`@AMontsouris-652-1-34-245.w83-202.abo.wanadoo.fr) Quit (Ping timeout: 248 seconds)
[20:41] * bru` (~bruno`@AMontsouris-652-1-49-223.w92-163.abo.wanadoo.fr) has joined #jython
[20:46] * bru` (~bruno`@AMontsouris-652-1-49-223.w92-163.abo.wanadoo.fr) Quit (Ping timeout: 245 seconds)
[20:57] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) Quit (Quit: This computer has gone to sleep)
[21:06] * valtih (~chatzilla@sushi.pld.ttu.ee) Quit (Ping timeout: 264 seconds)
[21:09] * verterok (~ggonzalez@unaffiliated/verterok) Quit (*.net *.split)
[21:09] * JStoker (jstoker@unaffiliated/jstoker) Quit (*.net *.split)
[21:11] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) has joined #jython
[21:15] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[21:15] * JStoker (jstoker@unaffiliated/jstoker) has joined #jython
[21:16] * JStoker (jstoker@unaffiliated/jstoker) Quit (Max SendQ exceeded)
[21:16] * JStoker (jstoker@unaffiliated/jstoker) has joined #jython
[21:23] * whg is now known as zz_whg
[21:25] * valtih (~chatzilla@sushi.pld.ttu.ee) has joined #jython
[21:55] * valtih (~chatzilla@sushi.pld.ttu.ee) Quit (Ping timeout: 248 seconds)
[22:00] * valtih (~chatzilla@sushi.pld.ttu.ee) has joined #jython
[22:29] * valtih (~chatzilla@sushi.pld.ttu.ee) Quit (Ping timeout: 248 seconds)
[22:31] * bru` (~bruno`@AMontsouris-652-1-86-95.w92-163.abo.wanadoo.fr) has joined #jython
[22:32] * valtih (~chatzilla@sushi.pld.ttu.ee) has joined #jython
[22:41] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) Quit (Quit: Leaving)
[22:42] * vIkSiT (~vIkSiT|2@50-0-250-34.dedicated.static.sonic.net) has joined #jython
[22:42] * vIkSiT (~vIkSiT|2@50-0-250-34.dedicated.static.sonic.net) Quit (Changing host)
[22:42] * vIkSiT (~vIkSiT|2@unaffiliated/viksit) has joined #jython
[22:46] <vIkSiT> hello all
[22:46] <vIkSiT> has anyone here used modjy?
[23:04] * valtih (~chatzilla@sushi.pld.ttu.ee) Quit (Ping timeout: 248 seconds)
[23:13] * valtih (~chatzilla@sushi.pld.ttu.ee) has joined #jython
[23:27] * valtih (~chatzilla@sushi.pld.ttu.ee) Quit (Read error: Connection reset by peer)
[23:27] * valtih (~chatzilla@sushi.pld.ttu.ee) has joined #jython
[23:52] * valtih_ (~chatzilla@sushi.pld.ttu.ee) has joined #jython
[23:52] * [Arfreve1] (~Arfrever@minotaur.apache.org) has joined #jython
[23:52] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 240 seconds)
[23:52] * clajo05 (~clajo04@pool-108-54-80-252.nycmny.fios.verizon.net) has joined #jython
[23:53] <peke> daenney: jimbaker: jruby-launcher is implemented in C++: https://github.com/jruby/jruby-launcher
[23:55] * truk77_ (~kurt@pool-71-191-95-144.washdc.fios.verizon.net) has joined #jython
[23:59] * valtih (~chatzilla@sushi.pld.ttu.ee) Quit (*.net *.split)
[23:59] * truk77 (~kurt@pool-71-191-95-144.washdc.fios.verizon.net) Quit (*.net *.split)
[23:59] * clajo04 (~clajo04@pool-108-54-80-252.nycmny.fios.verizon.net) Quit (*.net *.split)
[23:59] * [Arfrever] (~Arfrever@apache/committer/Arfrever) Quit (*.net *.split)
[23:59] * clajo05 is now known as clajo04


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