6 Example of how to obtain atom type names and atom type IDs in Python
9 __author__ =
'Cosmo Harrigan'
11 from opencog.atomspace
import AtomSpace, TruthValue, types, get_type_name
12 from opencog.scheme_wrapper
import load_scm, scheme_eval, scheme_eval_h, __init__
14 atomspace = AtomSpace()
17 data = [
"opencog/atomspace/core_types.scm",
18 "opencog/scm/utilities.scm"]
21 load_scm(atomspace, item)
23 atom = atomspace.add(types.ConceptNode,
"Frog #1")
26 print get_type_name(3) +
'\n'
29 print get_type_name(atom.type) +
'\n'
32 for key, value
in sorted(types.__dict__.iteritems()):