:; python Python 2.4.3 (#1, Jan 22 2007, 17:39:03) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import rdflib >>> g = rdflib.Graph('SQLite') __main__:1: DeprecationWarning: Use ConjunctiveGraph instead. ( from rdflib.Graph import ConjunctiveGraph ) >>> g.open('db') Traceback (most recent call last): File "", line 1, in ? File "build/bdist.darwin-8.10.1-i386/egg/rdflib/Graph.py", line 953, in open File "build/bdist.darwin-8.10.1-i386/egg/rdflib/Graph.py", line 317, in open File "build/bdist.darwin-8.10.1-i386/egg/rdflib/store/SQLite.py", line 44, in open pysqlite2.dbapi2.OperationalError: unable to open database file >>> g.open('./db', create=True) Traceback (most recent call last): File "", line 1, in ? File "build/bdist.darwin-8.10.1-i386/egg/rdflib/Graph.py", line 953, in open File "build/bdist.darwin-8.10.1-i386/egg/rdflib/Graph.py", line 317, in open File "build/bdist.darwin-8.10.1-i386/egg/rdflib/store/SQLite.py", line 44, in open pysqlite2.dbapi2.OperationalError: unable to open database file """ Now: def open(self, home, create=True): """ Opens the store specified by the configuration string. If create is True a store will be created if it does not already exist. If create is False and a store does not already exist an exception is raised. An exception is also raised if a store exists, but there is insufficient permissions to open the store.""" if create: db = dbapi2.connect(os.path.join(home,self.identifier)) (from http://rdflib.googlecode.com/svn/trunk/rdflib/store/SQLite.py) So: """ >>> print g.identifier LMErUxLM0 >>> import os >>> os.path.join('db', g.identifier) u'db/LMErUxLM0' >>> adw27@feldspar:~/Documents/workspace/sparql-scratch 532 $ :; mkdir db adw27@feldspar:~/Documents/workspace/sparql-scratch 533 $ :; python Python 2.4.3 (#1, Jan 22 2007, 17:39:03) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import rdflib >>> g = rdflib.Graph('SQLite') __main__:1: DeprecationWarning: Use ConjunctiveGraph instead. ( from rdflib.Graph import ConjunctiveGraph ) >>> g.open('db') 1