Decoding OceanScript

Use the decode() function.

Warning

If the oceanscript is not valid, OceanScriptError will be raised! See more about error handling here

Example Usage

>>> text = '^<....=.,*^-.^<.^>.~>..~-..%^-....=.,*~-._<._<.^<...%^>....=.,*_-.^<.~<..'
>>> oceanscript.decode(text)
'1. Bacon'
'2. Eggs'
'3. Ham'

>>> text = '*_-.~-.^>..^>..~>..\n~<.._<...\n~-..^<.~<..~-.\n_>.^<...\n*^-.._>..~-.^>...^<...^<.~<.^<.=!'
>>> oceanscript.decode(text)
'Hello my name is Kreusada!'