Re: [julia-users] Re: non-responsive REPL with PyCall

2015-10-25 Thread Yakir Gagnon
Finally had some time. Thanks for all the suggestions! I wouldn't know how to change stuff in that other python library (I only know some matlab and julia). But thanks. On Wednesday, October 14, 2015 at 5:49:32 AM UTC+10, Steven G. Johnson wrote: > > Note that PyCall supports passing Julia I

Re: [julia-users] Re: non-responsive REPL with PyCall

2015-10-25 Thread Yakir Gagnon
Thanks for the suggestion! I get an deserialize error. Not really sure how to make a S available on all processes: using Winston, PyCall, Reactive @pyimport seabreeze seabreeze.use("pyseabreeze") @pyimport seabreeze.spectrometers as sb devices = sb.list_devices() S = sb.Spectrometer(devices[1])

Re: [julia-users] Re: non-responsive REPL with PyCall

2015-10-13 Thread Steven G. Johnson
Note that PyCall supports passing Julia I/O streams to Python. So, if you can just monkey-patch the Python library to use a Julia I/O stream to talk to the spectrometer, then it will yield to Julia's event loops.

Re: [julia-users] Re: non-responsive REPL with PyCall

2015-10-13 Thread Stefan Karpinski
Yeah, this is a fundamental problem, not only with Python but any other C library that uses blocking calls. At one point, when wrapping such a C library, I had the slightly insane notion of using LD_PRELOAD to replace all the blocki

Re: [julia-users] Re: non-responsive REPL with PyCall

2015-10-13 Thread Yakir Gagnon
I'll try the remotecall option (next week), hopefully the fetch from that won't get things stuck. I imagine there are a lot of *other* Python libraries that don't use libuv and get Julia's coroutines stuck... Thanks for all the attention! Yakir Gagnon The Queensland Brain Institute (Building #79

Re: [julia-users] Re: non-responsive REPL with PyCall

2015-10-13 Thread Stefan Karpinski
I'm working on fixing up the API to Amit's PR here that allows you to call a C function in another thread. That could also potentially be used for this. On Tue, Oct 13, 2015 at 2:43 PM, Mohammed El-Beltagy < mohammed.elbelt...@gmail.com> wrote: > Sh

Re: [julia-users] Re: non-responsive REPL with PyCall

2015-10-13 Thread Mohammed El-Beltagy
Short of doing a reimplementation, you could possibly run your python code in another process via a remotecall (as described in the manual http://julia.readthedocs.org/en/latest/manual/parallel-computing/). In that case you REPL would be responsive as the I/O is done in another process. On Mon

Re: [julia-users] Re: non-responsive REPL with PyCall

2015-10-12 Thread Yakir Gagnon
I see, thanks for the great explanation! So there's nothing I can do. Would Escher get around it? I guess I'd need to implement that python code in Julia... On 12/10/2015 11:34 PM, "Steven G. Johnson" wrote: > > > On Monday, October 12, 2015 at 1:59:59 AM UTC-4, Yakir Gagnon wrote: >> >> One impo

[julia-users] Re: non-responsive REPL with PyCall

2015-10-12 Thread Steven G. Johnson
On Monday, October 12, 2015 at 1:59:59 AM UTC-4, Yakir Gagnon wrote: > > One important piece of information is the integration time (similar to the > shutter speed in a camera): after I set the integration time the > spectrometer start sampling the spectra at that frequency. When I try to > r