[Pellet-users] Importing SPARQL in Jython?
Margaret A Mitchell
itallow at u.washington.edu
Tue Apr 22 18:18:42 UTC 2008
Thanks! Unfortunately, SETH only works with Java 1.4, which is outdated. Every system I have access to is 1.6, which Seth doesn't seem to be able to handle...
I think I have to default to creating a query text file and calling the command line from Python, where I feed the query to Pellet that way...The only problem with that is it's much slower, so if anyone has any better ideas, let me know! =)
Thanks,
M
On Tue, 22 Apr 2008, Kendall Grant Clark wrote:
> Excerpts from Margaret A Mitchell's message of Sat Apr 19 21:56:07 -0400 2008:
>> Hello,
>>
>> I'm trying to access Pellet with Python, so I'm using Jython, but it doesn't
>> seem to be working very well...
>>
>>
>> This is what I have so far.
>>
>> import sys
>> import java
>> from java import *
>>
>> print "**********************"
>> print
>> print java.lang.System.getProperties()['java.class.path']
>> print
>> print sys.path
>> print
>> print "***********************"
>> print
>>
>> import jena
>> from jena import sparql
>>
>>
>> It chokes on that last line.
>> 'sparql' here is the 'sparql.java' file.
>>
>> Any ideas?
>
> Margaret,
>
> One reason I stopped using Java a million years ago and became a
> Python programmer is CLASSPATH hell. Which has gotten better, of
> course, but none of us here has used Java via Jython, so we can't
> offer any specific advice. Sorry.
>
> However, this is something we've internally identified as a priority,
> so if you happen to figure this out, we'd love to make a FAQ entry out
> of what you discover.
>
> There's also this alternate method for using Pellet from Python:
>
> http://seth-scripting.sourceforge.net/
>
> It uses JPype.
>
> --
> Cheers,
> Kendall
>
More information about the Pellet-users
mailing list