#jython IRC Log

Index

IRC Log for 2015-07-04

Timestamps are in GMT/BST.

[1:18] * gopar (~gopar@2601:642:c001:f5b9:a6db:30ff:fea2:873) has joined #jython
[4:22] * gopar (~gopar@2601:642:c001:f5b9:a6db:30ff:fea2:873) Quit (Quit: Leaving)
[5:23] * AndyBotwin (~sussman@unaffiliated/andybotwin) has joined #jython
[11:00] * mbooth (~mbooth@redhat/mbooth) Quit (Ping timeout: 244 seconds)
[11:16] * mbooth (~mbooth@cpc11-shef10-2-0-cust659.barn.cable.virginm.net) has joined #jython
[11:16] * mbooth (~mbooth@cpc11-shef10-2-0-cust659.barn.cable.virginm.net) Quit (Changing host)
[11:16] * mbooth (~mbooth@redhat/mbooth) has joined #jython
[14:26] * AndyBotwin (~sussman@unaffiliated/andybotwin) Quit (Quit: Leaving)
[14:44] * AndyBotwin (~sussman@177.204.22.251.dynamic.adsl.gvt.net.br) has joined #jython
[14:44] * AndyBotwin (~sussman@177.204.22.251.dynamic.adsl.gvt.net.br) Quit (Changing host)
[14:44] * AndyBotwin (~sussman@unaffiliated/andybotwin) has joined #jython
[16:59] * clajo04 (~clajo04@pool-108-54-80-65.nycmny.fios.verizon.net) Quit (Quit: clajo04)
[17:03] * clajo04 (~clajo04@pool-108-54-80-65.nycmny.fios.verizon.net) has joined #jython
[18:08] * mbooth (~mbooth@redhat/mbooth) Quit (Remote host closed the connection)
[18:10] * mbooth (~mbooth@redhat/mbooth) has joined #jython
[18:38] * pcfreak30 (~pcfreak30@cpe-71-76-241-81.triad.res.rr.com) has joined #jython
[18:39] <pcfreak30> How can I set the python module path for inside a jar?
[18:41] <agronholm> pcfreak30: I don't think you can
[18:42] <agronholm> did you package something in the wrong manner?
[18:42] <pcfreak30> im trying to make a jar that imports a packaged python library
[18:42] <agronholm> I do that all the time
[18:43] <pcfreak30> and runs it as an altenative to downloading a file to the end users machine
[18:43] <agronholm> so you package the python library in its own jar
[18:43] <agronholm> nothing wrong with that
[18:43] <pcfreak30> But the library is part of the jar
[18:43] <agronholm> why?
[18:43] <pcfreak30> the end user isnt a develop who will have python
[18:43] <agronholm> I'm confused
[18:44] <pcfreak30> Im trying to make a self contained app that runs python code..
[18:44] <agronholm> does it *have* to be a single jar
[18:44] <pcfreak30> Yes
[18:44] <pcfreak30> Its going to be a web applet
[18:44] <pcfreak30> If I do 2 jars just makes it complicated
[18:44] <agronholm> ok, then just package the library inside that jar, but not as a jar inside a jar
[18:44] <pcfreak30> Huh?
[18:45] <pcfreak30> I just have a Lib/ folder in the final jar with the module and entry script
[18:45] <agronholm> so move the stuff from Lib/ to the root
[18:45] <agronholm> then the class path importer can find your stuff
[18:45] <pcfreak30> Can you not set the classpath?
[18:46] <agronholm> to what, exactly?
[18:46] <pcfreak30> to be another location in the jar
[18:46] <agronholm> if you can find a way to do that in a manner which classpathimporter understands, sure
[18:46] <agronholm> but I'm not intimately familiar with its inner workings
[18:46] <pcfreak30> what class loader is being used?
[18:47] <pcfreak30> a custom one?
[18:47] <agronholm> I wish I could answer that question with confidence
[18:48] <pcfreak30> just trying to find the source code so i can check
[18:49] <agronholm> hg.python.org/jython
[18:54] <pcfreak30> why does PythonInterpreter.execfile require both the resource and name
[19:08] <pcfreak30> NameError("name 'Client' is not defined",). How do i import a singleton java class
[19:09] <agronholm> they're no different from the rest
[19:09] <agronholm> what did you mean by execfile requiring both resource and name
[19:09] <agronholm> it only takes one parameter
[19:10] <agronholm> there is a version of it that takes two arguments, I see
[19:10] <pcfreak30> yes overload
[19:10] <agronholm> but you don't have to use that
[19:37] * AndyBotwin (~sussman@unaffiliated/andybotwin) Quit (Ping timeout: 248 seconds)
[19:38] * AndyBotwin (~sussman@unaffiliated/andybotwin) has joined #jython
[19:42] * AndyBotwin (~sussman@unaffiliated/andybotwin) Quit (Max SendQ exceeded)
[19:44] * AndyBotwin (~sussman@unaffiliated/andybotwin) has joined #jython
[20:49] <pcfreak30> How can I prevent a delay on GUI rendering as it seems when a PythonInterpreter object is created it causes a 5 second delay
[21:01] <agronholm> pcfreak30: create it inside a thread other than the UI thread
[21:08] <pcfreak30> trying to use a swing worker & propery change event
[21:13] <agronholm> you could also utilize my jython-swingutils library
[21:13] <agronholm> I was about to cut a new release too
[21:13] <agronholm> but obviously you need to initialize the interpreter first :)
[21:21] <pcfreak30> https://gist.github.com/pcfreak30/bb7af13ff8793536bd9c
[21:21] <agronholm> next time, syntax highlighting plz
[21:22] <pcfreak30> I Used an IDE to post it
[21:22] <pcfreak30> Can you tell me why the change listener isnt firing for py?
[21:22] <pcfreak30> highlighting updated
[21:22] <agronholm> still no highlighting
[21:22] <agronholm> where is the change listener set?
[21:23] <pcfreak30> hmm i set it twice
[21:23] <pcfreak30> line 51
[21:24] <pcfreak30> it calls for state but not py
[21:27] <agronholm> pcfreak30: you're not firing a property change event anywhere
[21:27] <agronholm> they're not automatic you know
[21:29] <agronholm> are the "Void" and "return null" really necessary?
[21:30] <pcfreak30> WEll I just need a reference to PythonInterpreter without it hanging on init
[21:30] <pcfreak30> So not submitting any progress
[21:30] <pcfreak30> and i thought they were :P
[21:31] <agronholm> why not just override done() then?
[21:31] <pcfreak30> is done ran on the gui or background thread?
[21:33] <agronholm> have you read the docs for SwingWorker?
[21:34] <agronholm> if not, how did you come up with the idea in the first place?
[21:37] <pcfreak30> i did, but a lot of it was excessive
[21:38] <agronholm> ok -- the docs say for done(): Executed on the Event Dispatch Thread after the doInBackground method is finished.
[21:38] <pcfreak30> ok that wouldnt work then
[21:39] <pcfreak30> creating a new instance has to be a separate thread to not block the ui
[21:39] <agronholm> pcfreak30: eh?
[21:39] <agronholm> but you're creating it in doInBackground()
[21:39] <pcfreak30> firePropertyChange is defined on what class, cant find it and no autocomplted
[21:39] <agronholm> JavaBeanSupport
[21:39] <pcfreak30> sorry, thought you ment to define in done :P
[21:40] <agronholm> yes
[21:40] <agronholm> BOTH
[21:40] <agronholm> in doInBackground() you create the interpreter
[21:40] <agronholm> in done() you do whatever else you need to do with it, but in the event dispatch thread
[21:52] <pcfreak30> ok im good
[21:53] <pcfreak30> is there a reason why the interpreter takes 5 seconds to just start up?
[21:53] <agronholm> it has to import all kinds of stuff, and it's not very optimized
[21:53] <agronholm> no particular good reason

Index

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