#jython IRC Log (v0.9)

Index

IRC Log for 2010-07-30

Timestamps are in GMT/BST.

[1:04] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Quit: jimbaker)
[1:31] * jimbaker (~jbaker@64.134.11.130) has joined #jython
[1:50] * tristanbuckner (~tristan@38.99.42.113) Quit (Quit: tristanbuckner)
[2:03] * jimbaker (~jbaker@64.134.11.130) Quit (Quit: jimbaker)
[2:26] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[2:29] * lopex (lopex@chello089076044027.chello.pl) Quit ()
[3:21] * juneau001 (~juneau@pool-72-69-213-153.chi01.dsl-w.verizon.net) has joined #jython
[3:30] <pr3d4t0r> albino: Heh - I just thought of something.
[3:30] <pr3d4t0r> albino: If you jailbreak your iPhone/iPad, you can use Python directly over PyObjC and manipulate the GUI directly :)
[3:55] * thobe (~Adium@70-89-156-205-Oakley.hfc.comcastbusiness.net) has joined #jython
[4:04] <albino> pr3d4t0r: sure
[4:05] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[4:45] * pigletto (~pigletto@dvd35.neoplus.adsl.tpnet.pl) has joined #jython
[4:56] * clajo04_ (~clajo04_@pool-74-108-95-175.nycmny.fios.verizon.net) has joined #jython
[5:09] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Quit: jimbaker)
[6:53] * jabley (~jabley@cpc1-farn4-0-0-cust318.glfd.cable.ntl.com) has joined #jython
[7:31] * roicho (~Noi@82.137.36.157) has joined #jython
[7:50] * roicho (~Noi@82.137.36.157) Quit (Ping timeout: 248 seconds)
[8:07] * roicho (~Noi@82.137.36.107) has joined #jython
[8:07] * roicho (~Noi@82.137.36.107) Quit (Client Quit)
[9:04] * pigletto (~pigletto@dvd35.neoplus.adsl.tpnet.pl) Quit (Remote host closed the connection)
[9:14] * jabley (~jabley@cpc1-farn4-0-0-cust318.glfd.cable.ntl.com) Quit (Quit: jabley)
[9:51] * lheuer (~heuer@unaffiliated/lheuer) has joined #jython
[9:54] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) has joined #jython
[10:05] * juneau001 (~juneau@pool-72-69-213-153.chi01.dsl-w.verizon.net) Quit (Quit: juneau001)
[10:36] * azazel (~user@88-149-140-8.dynamic.ngi.it) has joined #jython
[11:14] * juneau001 (~juneau@FESS-116326-2163987-dp.dhcp.fnal.gov) has joined #jython
[13:11] * lucian (~lucian@nat67.mia.three.co.uk) has joined #jython
[13:32] * lucian (~lucian@nat67.mia.three.co.uk) Quit (Ping timeout: 258 seconds)
[14:14] * jimbaker (~jbaker@64.134.151.241) has joined #jython
[14:23] * clajo04_ (~clajo04_@pool-74-108-95-175.nycmny.fios.verizon.net) Quit (Quit: clajo04_)
[14:39] * skay (~skay@pat1.orbitz.net) has joined #jython
[14:51] * thobe (~Adium@70-89-156-205-Oakley.hfc.comcastbusiness.net) Quit (Ping timeout: 245 seconds)
[14:55] * jimbaker (~jbaker@64.134.151.241) Quit (Quit: jimbaker)
[15:08] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[15:08] * thobe (~Adium@70-89-156-205-Oakley.hfc.comcastbusiness.net) has joined #jython
[15:27] * lheuer (~heuer@unaffiliated/lheuer) Quit (Quit: Closing Time)
[15:38] * pr3d4t0r is now known as pr3d4k4t
[15:39] <pr3d4k4t> Hai.
[15:44] * thobe (~Adium@70-89-156-205-Oakley.hfc.comcastbusiness.net) Quit (Quit: Leaving.)
[16:01] * jimbaker (~jbaker@72.19.153.160) has joined #jython
[16:23] * yekinabud (~tony@fsf/member/yekinabud) has joined #jython
[16:27] <yekinabud> can someone point me to some docs to better understand python module importing in jython? I read ch.8 and the book but still dont understand why importing logging breaks on its os dependency..
[16:35] <jimbaker> yekinabud: logging works in general on jython. two possibilities come to mind: your container is preventing some aspect of your logging, given the os dependency. (but this seems unlikely, we do fallback from our native posix support to what pure java alone would support.) or perhaps you have a setup issue. maybe a bad path somewhere?
[16:36] <jimbaker> usual advice applies - write the smallest program that exhibits this behavior, ideally on a fresh install
[16:37] <jimbaker> (obviously if you are not using a container like a java app server, that possibility doesn't apply)
[16:40] <yekinabud> jimbaker: thanks, I'm trying to follow the dependency path and make sure my syspath has everything in it - so i tried importing my own module (called rattail) which broke on its logging dependency, so then i added /usr/lib/python2.6, so now my jython sys.path looks like this: ['', '/usr/share/jython/Lib', '__classpath__', '__pyclasspath__/', '/usr/lib/python2.6/site-packages', '/home/tony/sandbox/pylons/rattail', '/usr/lib/python2.6']
[16:41] <yekinabud> does that look okay so far?
[16:41] <sabi> no. do not put CPython's library in jython's classpath, certainly not CPython 2.6
[16:41] <jimbaker> i don't think it's such a good idea to just pull in python2.6 site packages
[16:42] <jimbaker> consider using something like virtualenv + pip to manage your site packages, and do that w/in jython of course
[16:42] <jimbaker> so that looks like your problem. and the solution is the standard python solution :)
[16:43] <yekinabud> sabi, jimbaker: okay, good, i knew i had something wrong there - I'll try using virtualenv + pip - i am new to both python and jython, sorry if the solution is obvious
[16:43] <jimbaker> http://jythonpodcast.hostjava.net/jythonbook/en/1.0/appendixA.html#virtualenv
[16:44] <yekinabud> jimbaker: thanks for the link! i'll start there
[16:44] <jimbaker> very important to know, we have a very standard python implementation in jython, not something that has python syntax :)
[17:02] * lopex (lopex@chello089076044027.chello.pl) has joined #jython
[17:04] * jimbaker (~jbaker@72.19.153.160) Quit (Quit: jimbaker)
[17:06] <yekinabud> jimbaker: i'm following the instructions to create a virtualenv but get an import error on os again - this time from virtualenv.py
[17:07] <yekinabud> i installed it via jython2.5.1/bin/easy_install
[17:07] <yekinabud> isnt jython supposed to use javaos instead of os?
[17:08] <sabi> javaos is just an implementation detail
[17:09] * jimbaker (~jbaker@72.19.153.160) has joined #jython
[17:10] <yekinabud> sabi: yeah, okay, i see os.py in my jython2.5.1 lib - i wonder why it isn't importing when i try to create the virtual env?
[17:13] <sabi> no idea, that's weird.
[17:13] <yekinabud> i think my path is jacked up
[17:14] <sabi> could be. :) try pasting stuff into the pastebin, it always helps to have more context
[17:15] <yekinabud> k, fooling with the path first to see if i can figure it out
[17:17] * pigletto (~pigletto@dvd35.neoplus.adsl.tpnet.pl) has joined #jython
[17:22] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) Quit (Quit: jabley)
[17:23] * tristanbuckner (~tristan@38.99.42.113) has joined #jython
[17:56] * jimbaker (~jbaker@72.19.153.160) Quit (Ping timeout: 240 seconds)
[17:58] * jabley (~jabley@cpc1-farn4-0-0-cust318.glfd.cable.ntl.com) has joined #jython
[18:50] * lucian (~lucian@nat67.mia.three.co.uk) has joined #jython
[19:06] * azazel` (~user@88-149-142-24.dynamic.ngi.it) has joined #jython
[19:10] * azazel (~user@88-149-140-8.dynamic.ngi.it) Quit (Ping timeout: 258 seconds)
[19:18] * jimbaker (~jbaker@sta-204-144-184-242.rockynet.com) has joined #jython
[19:29] * juneau001 (~juneau@FESS-116326-2163987-dp.dhcp.fnal.gov) Quit (Quit: juneau001)
[19:51] * stakkars (~tismer@i577B7E69.versanet.de) Quit (Ping timeout: 260 seconds)
[19:57] * stakkars (~tismer@i59F7C734.versanet.de) has joined #jython
[20:02] * lucian (~lucian@nat67.mia.three.co.uk) Quit (Ping timeout: 240 seconds)
[20:04] * clajo04_ (~clajo04_@pool-74-108-95-175.nycmny.fios.verizon.net) has joined #jython
[21:17] * skay (~skay@pat1.orbitz.net) Quit (Quit: skay)
[21:29] * jabley (~jabley@cpc1-farn4-0-0-cust318.glfd.cable.ntl.com) Quit (Quit: jabley)
[21:44] * pigletto (~pigletto@dvd35.neoplus.adsl.tpnet.pl) Quit (Remote host closed the connection)
[21:59] <yekinabud> trying to install psycopg2 via pip in jython virtual env and get "error: Compiling extensions is not supported on Jython" - does this sound familiar to anybody? anybody got psycopg2 working with jython?
[22:03] <azazel`> yekinabud: as far as i know psycopg2 needs to compile a binding for le postgres c client lib using cpython headers
[22:03] <azazel`> how can you think to use it in jython?
[22:04] <yekinabud> azazel`: i'm importing a module that uses it for it's db connection
[22:04] <azazel`> ah, you should search for a non c alternative
[22:05] <yekinabud> i've connected to pgsql with my jython scripts using JDBC before - is there no way to do it with the python psycopg2 driver?
[22:05] <azazel`> mmm?
[22:06] <sabi> yekinabud: use zxjdbc instead
[22:06] <azazel`> no way to use psycopg2 from jython...
[22:07] <yekinabud> sabi: hm, guess i need to figure out how to override that connection method that i'm importing, then
[22:07] <yekinabud> sabi, azazel`: and the reason psycopg2 wont work is because it depends on cpython headers?
[22:07] <azazel`> yes
[22:08] <sabi> exactly.
[22:08] <azazel`> it depends on libpg-client
[22:08] <yekinabud> sabi, azazel`: sorry if i've missed it, but is there a list of python modules that can't be used with jython because of this?
[22:08] <sabi> yekinabud: no, but it's generally pretty obvious :)
[22:09] <yekinabud> sabi: how is it obvious?
[22:09] <sabi> if there are any C files in the module.
[22:10] <sabi> if it's just got .py files in it then you should generally be ok
[22:10] <yekinabud> okay, so you have to inspect or try out the modules first and then you'll realize it when you get the compile error - i guess that's obvious enough
[22:10] <yekinabud> got it, thanks
[22:10] <azazel`> not really... the c version of a module can be a speedup version of some code that exists event in python
[22:11] * jimbaker (~jbaker@sta-204-144-184-242.rockynet.com) Quit (Quit: jimbaker)
[22:11] <sabi> sure, but in that case, well-written modules should fall back
[22:12] <sabi> it's also pretty common on CPython if you're installing a module on windows for which most users don't have a C compiler installed
[22:12] <azazel`> so, to be precise, if contains c/cpp files _and_ depends on something other than python for compilation you can be sure you can't use it in jython
[22:12] <sabi> yeah, best way is just to try to install it.
[22:12] * jimbaker (~jbaker@sta-204-144-184-242.rockynet.com) has joined #jython
[22:13] <yekinabud> got it - makes sense - thanks guys
[22:14] <azazel`> doh... installation of samsung app for the phone takes ages...
[22:15] <azazel`> aaargh.... it wants to install .net 3.5....bloathware
[22:15] <azazel`> yekinabud: you're welcome
[22:15] <jimbaker> you could you use a pure python version, http://pybrary.net/pg8000/ - but i would definitely recommend zxJDBC, which is also supported by django-jython and sqlalchemy
[22:20] <yekinabud> jimbaker: thanks for the tip - i'm using it with sqlalchemy, so i think i'll need zxJDBC
[22:33] * skay (~skay@c-71-239-171-114.hsd1.il.comcast.net) has joined #jython
[23:34] * yekinabud (~tony@fsf/member/yekinabud) Quit (Quit: Leaving.)
[23:48] * jimbaker (~jbaker@sta-204-144-184-242.rockynet.com) Quit (Quit: jimbaker)

Index

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