Thank you for your reply.

I know that pyjulia exists, but I didn't try it.
The core idea of pyjulia seems to be incorporated into IJulia, but they 
does not share the source code.
I'm going to investigate the functionality of PyCall.jl.
Thanks again!


On Monday, March 10, 2014 2:05:42 AM UTC+9, Isaiah 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 <bicyc...@gmail.com<javascript:>
> > 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)
>>
>
>

Reply via email to