#
# This file reads files that are generated by the OPENCOG_ADD_ATOM_TYPES
# macro so they can be imported using:
#
# from storage import *
#
# This imports all the python wrappers for atom creation.
#
import warnings
from cython.operator cimport dereference as deref
from opencog.atomspace import types
from opencog.atomspace import regenerate_types
# These are imported so that they become available to the
# autogened type constructors.
from opencog.atomspace import add_node, add_link
# The list of Atom Types that python knows about has to be rebuilt,
# before much else can be done.
regenerate_types()
include "opencog/persist/storage/storage_types.pyx"
from opencog.atomspace cimport AtomSpace, cAtomSpace
# from opencog.storage cimport c_load_file
def load_file(path, AtomSpace atomspace):
cdef string p = path.encode('utf-8')
c_load_file(p, deref(<cAtomSpace*>atomspace.shared_ptr.get()))
# -----------------------------------------