Skip to content

Instantly share code, notes, and snippets.

@patham9
Last active January 23, 2026 20:21
Show Gist options
  • Select an option

  • Save patham9/54af0acff57a1d0be82d339c5e818b47 to your computer and use it in GitHub Desktop.

Select an option

Save patham9/54af0acff57a1d0be82d339c5e818b47 to your computer and use it in GitHub Desktop.
PeTTa from Python (after "pip install sexpdata")
from sexpdata import loads
from petta import *
metta = PeTTa()
expstring = metta.process_metta_string("!(hello \"world\" (1.0 1))")[0]
print(loads(expstring))
#Output:
#[Symbol('hello'), 'world', [1.0, 1]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment