Administrator
|
Hi,
You can look at reasoning.py in Owlready2 sources for examples.
Basically, for saving the ontology, use:
ontology.save("temp_filename", format="ntriples", commit=False)
NTriples format is faster to serialize, so I use it for temporary file. commit=False avoid commiting the ontology and saving the quadstore if it is stored on disk.
Then, use the subprocess Python standard module for calling the command line (see its doc in Python docs).
Jiba
|