+1e99 to using starting with Jake's pyjulia instead of duplicating this effort. It's much better for there to be one really great way to call Julia from Python than many less good ways. That said, I've felt for some time that this functionality really needs an owner – someone to turn it into a real easy_install/pip-able package that just works, assuming you have an appropriately configured Julia install. Perhaps you're interested in that? Or you and Jake can work on it jointly?
On Sun, Mar 9, 2014 at 1:05 PM, Isaiah Norton <[email protected]>wrote: > You might also consider starting from and contributing to - or at least > looking at - this: > > https://github.com/jakebolewski/pyjulia > > The important idea there is to use the existing PyCall machinery to do > conversions, which will save you a lot of headache (also, it does > everything using ctypes which will make cross-platform deployment much > simpler). > > > On Sat, Mar 8, 2014 at 10:11 PM, Kenta Sato <[email protected]> wrote: > >> Hi, >> >> I'm new to the Julia language, and I'm now trying the Julia C API in >> order to call Julia functions from Python. >> I've become successful with calling some basic Julia functions such as >> (*) and sqrt() and converting the returned values to corresponding ones in >> Python. >> But I've got into a trouble to check whether a return value from Julia is >> `nothing` or not. >> >> In the julia.h header, there seems to be a related macro named >> `jl_is_null(v)`, but I'm not sure that this is the predicate I want because >> its name is not `jl_is_nothing(v)` as expected. >> >> In addition, when I called `jl_is_null(v)`, I got a dynamic linking >> error, which said: >> >> Traceback (most recent call last): >>> File "sample.py", line 2, in <module> >>> import libjulia as jl >>> ImportError: dlopen(/Users/kenta/myapp/libjulia/libjulia.so, 2): Symbol >>> not found: _jl_null >>> Referenced from: /Users/kenta/myapp/libjulia/libjulia.so >>> Expected in: flat namespace >>> in /Users/kenta/myapp/libjulia/libjulia.so >> >> >> Please note that `libjulia.so` is the name of my python library. >> >> libjulia.dylib contains `_jl_null` symbol but it is local one: >> >> /Users/kenta/vendor/julia% nm usr/lib/libjulia.dylib| grep jl_null >>> [master] >>> 0000000000c2a3f0 s _jl_null >> >> >> I've got stuck at this point. Could you give me some advice? >> >> Julia: commit b52f17544d70ebc41508d6776ab3ca0ac26ccb3 >> OS: Mac OS X 10.9.2 (Mavericks) >> > >
