#jython IRC Log (v0.9)

Index

IRC Log for 2010-12-27

Timestamps are in GMT/BST.

[0:04] * lopex (lopex@89-76-44-27.dynamic.chello.pl) Quit ()
[0:04] * jimbaker (~jimbaker@wsip-24-234-240-209.lv.lv.cox.net) Quit (Quit: jimbaker)
[0:16] * wmeissner (~wmeissner@203.17.70.52) has joined #jython
[1:10] * seberg (~sebastian@vpn-3051.gwdg.de) Quit (Quit: Ex-Chat)
[2:01] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 240 seconds)
[2:01] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[2:12] * njoyce (~njoyce@124-150-95-54.dyn.iinet.net.au) has joined #jython
[4:40] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 240 seconds)
[5:12] * jimbaker (~jimbaker@wsip-24-234-240-209.lv.lv.cox.net) has joined #jython
[5:43] * njoyce (~njoyce@124-150-95-54.dyn.iinet.net.au) Quit (Ping timeout: 240 seconds)
[5:48] * njoyce (~njoyce@124-149-28-38.dyn.iinet.net.au) has joined #jython
[6:25] * XmasMoo is now known as Moo--
[6:28] * jimbaker (~jimbaker@wsip-24-234-240-209.lv.lv.cox.net) Quit (Quit: jimbaker)
[6:53] * wmeissner (~wmeissner@203.17.70.52) Quit (Quit: wmeissner)
[8:21] * wmeissner (~wmeissner@C-59-100-102-153.bri.connect.net.au) has joined #jython
[8:23] * thobe (~Adium@212-162-171-110.skbbip.com) has joined #jython
[8:56] * ohumbel (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[9:02] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[12:31] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[13:05] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 240 seconds)
[13:39] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Ping timeout: 265 seconds)
[14:39] * seberg (~sebastian@vpn-3027.gwdg.de) has joined #jython
[15:10] * verterok (~ggonzalez@190.188.220.52) has joined #jython
[15:10] * verterok (~ggonzalez@190.188.220.52) Quit (Changing host)
[15:10] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[15:43] * thobe (~Adium@212-162-171-110.skbbip.com) Quit (Quit: Leaving.)
[15:50] * wmeissner (~wmeissner@C-59-100-102-153.bri.connect.net.au) Quit (Quit: wmeissner)
[16:01] * bimbo (~emerino@poseidon.etesa.com.mx) has joined #jython
[16:02] <bimbo> hello, I'm trying to load a script that resides in a jar file, if the script is pure python it'll load without problems, but if the script uses any java object (even JSE objects, like java.lang.Object) the it'll fail to load the object, throwing an UnicodeException
[16:02] <bimbo> if the script is loaded from the filesystem there's no such error
[16:02] <bimbo> does anyone have a clue what might be happenin?
[16:04] <agronholm> bimbo: how are you loading the script?
[16:07] <bimbo> agronholm: using PythonInterpreter and PySystemState#path#insert(0, "/path/to/jarFile.jar")
[16:07] <agronholm> bimbo: can you construct a trivial example that demonstrates the issue?
[16:10] <bimbo> agronholm: sure, just a sec
[16:12] * adiroiban (~adiroiban@h194-54-129-79.teleson.ro) has joined #jython
[16:27] <bimbo> agronholm: http://pastie.org/1408847
[16:35] <agronholm> what imports do I need
[16:35] <agronholm> to compile
[16:39] <agronholm> nvm
[16:43] <agronholm> bimbo: can you upload your test.jar somewhere where I could get it from?
[16:45] <agronholm> generally it is a bad idea to use java style package names for python stuff
[16:45] <agronholm> it just does't work
[16:45] <agronholm> doesn't
[16:45] <agronholm> I'm not sure how you ever got to that point where it throws a UnicodeException
[16:46] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[16:49] <pr3d4t0r> Heh.
[16:49] <pr3d4t0r> Good morning.
[16:49] * lopex (lopex@89-76-44-27.dynamic.chello.pl) has joined #jython
[16:49] <pr3d4t0r> bimbo: Still fighting the Unicode-on-superclass bit?
[16:50] <bimbo> http://devio.us/~emerino/test.jar
[16:50] <bimbo> pr3d4t0r: still... :(
[16:52] <agronholm> bimbo: getting a "no module named devpower"
[16:52] <agronholm> did you try with a different namespace?
[16:52] <agronholm> ie. no "com" or "org" at the beginning?
[16:52] <agronholm> like, just devpower/?
[16:54] <bimbo> agronholm: hmm no, but I don't know why yoy are getting that error...
[16:54] <agronholm> how are you launching jython?
[16:54] <agronholm> I did "java -cp .:/home/alex/t/test.jar:/home/alex/libs/jython2.5.2rc2/jython.jar Test"
[16:55] <agronholm> nvm, I meant how you are launching java
[16:57] <agronholm> bimbo: are you there?
[16:57] <agronholm> if you want help, pay attention and answer the questions please
[16:57] <bimbo> agronholm: just a second please (phone)
[17:15] <bimbo> agronholm: sorry, I'm back, I'm running the test exactly as you did, I tried using a different namespace "package" but I'm getting the same error
[17:19] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 240 seconds)
[17:20] <agronholm> I had modified the java file, but now I restored your version (with the jar path obviously altered) and it runs fine now
[17:23] <bimbo> agronholm: it runs fine? it doesn't throw the UnicodeException?
[17:23] <agronholm> no exception
[17:26] <bimbo> agronholm: same test.jar and same Test class I pasted?
[17:26] <agronholm> yup
[17:28] <agronholm> pr3d4t0r: are you getting similar results to mine? no exception?
[17:29] <bimbo> agronholm: windows?
[17:29] <agronholm> linux
[17:29] <bimbo> what encoding are you using?
[17:30] <agronholm> file system encoding is utf-8 on pretty much all modern operating systems except Windows
[17:30] <agronholm> not that it matters here
[17:30] <agronholm> since the source files are all in ascii anyway
[17:32] <bimbo> hmm what can be the problem then? if I run the files from the filesystem there's no such problem, it only happens when using the jar
[17:32] <agronholm> what java implementation?
[17:34] <bimbo> agronholm: oracle's jdk 1.6.0_22
[17:35] <agronholm> openjdk here
[17:35] <agronholm> icedtea6 1.9.2 (java 1.6.0_20)
[17:38] <bimbo> agronholm: one second please, phone again
[17:42] * MarderIII (~marderii@enneman.demon.nl) has joined #jython
[17:55] <bimbo> agronholm: I'm sorry, I'm back, I'm at work that's why I need to answer the phone, my apologies
[17:55] <bimbo> agronholm: I tried using openjdk too, but same result...
[17:55] <agronholm> have you tried it on linux or any other os besides Windows?
[17:56] <bimbo> agronholm: I'm using linux actually..
[18:03] <agronholm> bimbo: and the way you launch java is "java -cp .:/path/to/test.jar:/path/to/jython.jar Test" ?
[18:04] <agronholm> or what
[18:04] <agronholm> seems to work without the middle component too
[18:08] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 260 seconds)
[18:22] <bimbo> agronholm: I just found out what the problem was, the file "test.jar" was under a directory like "/home/emerino/Programaci??n/test.jar", after changing the file to a different directory that does not have characters like "'??" and it works
[18:23] <bimbo> but why did this happen?
[18:23] <agronholm> I don't really know
[18:23] <agronholm> you should ask a core developer
[18:24] <agronholm> like jim
[18:28] <agronholm> bimbo: try adding that path to test.jar as a unicode literal
[18:33] <pr3d4t0r> bimbo: File system naming.
[18:33] <pr3d4t0r> bimbo: Rule for package and module names: stick to English if you can :)
[18:33] <pr3d4t0r> bimbo: Or at least stick to alphanumerics in the English alphabet.
[18:33] <agronholm> that directory was neither a package or a module name
[18:33] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[18:34] <agronholm> hm, I should test that too
[18:36] <agronholm> looks like it fails even with a unicode path component
[18:52] * seberg_ (~sebastian@vpn-3027.gwdg.de) has joined #jython
[18:54] * seberg (~sebastian@vpn-3027.gwdg.de) Quit (Ping timeout: 240 seconds)
[19:12] * nick (~njoyce@203-206-250-124.dyn.iinet.net.au) has joined #jython
[19:12] * nick is now known as Guest28096
[19:13] * njoyce (~njoyce@124-149-28-38.dyn.iinet.net.au) Quit (Ping timeout: 264 seconds)
[19:18] * thijstriemstra (~thijstrie@i219160.upc-i.chello.nl) has joined #jython
[19:26] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 240 seconds)
[19:30] * stakkars (~tismer@77-21-85-35-dynip.superkabel.de) Quit (Quit: stakkars)
[19:33] * stakkars (~tismer@77-21-85-35-dynip.superkabel.de) has joined #jython
[19:41] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[19:42] * njoyce (~njoyce@124-150-108-118.dyn.iinet.net.au) has joined #jython
[19:44] * Guest28096 (~njoyce@203-206-250-124.dyn.iinet.net.au) Quit (Ping timeout: 260 seconds)
[19:49] * njoyce (~njoyce@124-150-108-118.dyn.iinet.net.au) Quit (Ping timeout: 255 seconds)
[20:42] * MarderIII (~marderii@enneman.demon.nl) Quit (Quit: leaving)
[21:09] * seberg_ (~sebastian@vpn-3027.gwdg.de) Quit (Ping timeout: 255 seconds)
[21:42] * Caffeine_355mL (~Caffeine_@c-98-215-249-156.hsd1.il.comcast.net) has joined #jython
[21:42] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)
[21:45] <Caffeine_355mL> I am trying to make a UI for python. I am marginaly familiar with java and have used the Netbeans builder to create a simple UI
[21:45] <Caffeine_355mL> In Jython i was able to import this UI as a .jar and can do things like .setText('stuff')
[21:46] <Caffeine_355mL> I havnt figured out how to make a jButton press ( in the ui.jar ) trigger code in my script file though
[21:46] <Caffeine_355mL> is this possible?
[21:47] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[21:54] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 265 seconds)
[21:56] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[21:57] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 240 seconds)
[22:01] <agronholm> Caffeine_355mL: "how to make a jButton press" <- what?
[22:02] <Caffeine_355mL> well, i have a MainUI.java built by netbeans with a button on it
[22:03] <Caffeine_355mL> I would like to be able to press that button and have it run a function in my .py
[22:03] <Caffeine_355mL> the jython.py is importing the MainUI.java as a .jar
[22:03] <agronholm> mixing java and python is not the easiest of tasks
[22:04] <agronholm> I do all my UIs with jformdesigner, since it can build UIs from xml without involving any java code generation
[22:04] <Caffeine_355mL> well, sofar I have been able to edit the text on the window from jython
[22:04] <agronholm> yeah but calling python code from java is another matter altogether
[22:04] <Caffeine_355mL> yah, was wondering where to start
[22:05] <agronholm> are you just experimenting or is this part of a larger project?
[22:05] <Caffeine_355mL> or, if it would be easier ... if anyone knows of a GUI builder that would allow me to drag / drop a UI together like the Netbeans builder
[22:05] <agronholm> jformdesigner is one such gui builder
[22:05] <agronholm> there are others, but that is what I use
[22:05] <Caffeine_355mL> jformdesigner outputs jython code?
[22:05] <agronholm> no
[22:06] <Caffeine_355mL> well then im back to square 1?
[22:06] <agronholm> you can either have it construct the UI from xml
[22:06] <agronholm> or have it generate java code
[22:06] <agronholm> I opt for the xml route these days
[22:06] <Caffeine_355mL> ok, so how do i get jython to draw the XML gui
[22:06] <agronholm> using jformdesigner's runtime
[22:06] <Caffeine_355mL> kk, i will check that out
[22:07] <Caffeine_355mL> ty for the info
[22:07] <agronholm> Caffeine_355mL: I suggest you look up jython-swingutils
[22:07] <agronholm> there is an example for using jformdesigner with it too
[22:07] <Caffeine_355mL> kk
[22:07] <agronholm> are you absolutely certain that you want to build a swing based UI?
[22:07] <agronholm> what is the application? is this part of a larger project?
[22:08] <Caffeine_355mL> well, i have a python project that reads and writes to a sqlite db
[22:08] <Caffeine_355mL> trying to make it more visible ... and less commandprompt
[22:08] <agronholm> warning: jython does not support sqlite
[22:08] <Caffeine_355mL> wtf
[22:08] <agronholm> at the moment at least
[22:08] <Caffeine_355mL> srsly?
[22:09] <Caffeine_355mL> well that puts a fork in that idea
[22:09] <agronholm> because sqlite support in cpython was implemented using an external library
[22:09] <agronholm> there is an sqlite library for java which you can use but it's hardly a drop-in replacement
[22:09] <Caffeine_355mL> yah, no joke
[22:10] <agronholm> is this a hobby project or something you do at work
[22:10] <Caffeine_355mL> i like python ... but it seems like there are no simple GUIs for it
[22:10] <Caffeine_355mL> hobby
[22:10] <agronholm> well you could go for pyqt, wxpython or whatever
[22:10] <agronholm> there are alternatives.
[22:10] <Caffeine_355mL> ok
[22:10] <agronholm> don't use jython unless you need java compatibility
[22:10] <agronholm> too many drawbacks
[22:11] <Caffeine_355mL> yah, was wondering why more people dont use it ... no i know
[22:11] <Caffeine_355mL> now*
[22:11] <Caffeine_355mL> thank you for your info
[22:11] <agronholm> np
[22:28] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[22:37] * adiroiban (~adiroiban@h194-54-129-79.teleson.ro) Quit (Ping timeout: 255 seconds)
[23:02] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 240 seconds)
[23:05] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 255 seconds)
[23:06] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[23:18] * Caffeine_355mL (~Caffeine_@c-98-215-249-156.hsd1.il.comcast.net) has left #jython
[23:24] * seberg (~sebastian@vpn-3027.gwdg.de) has joined #jython
[23:37] * seberg (~sebastian@vpn-3027.gwdg.de) Quit (Quit: Ex-Chat)

Index

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