hackersh — Parse and execute Hackersh code

This Python module provides the capability to parse and evaluate a string as Hackersh code

hackersh.parse(source)

Parse text-mode Hackersh scripting language into a directed graph (i.e. networkx.DiGraph)

Args:
source: A string representing text-based Hackersh code.
Returns:
A directed graph (i.e. networkx.DiGraph) of Hackersh symbols.
Raises:
SyntaxError: An error occurred parsing the code.
hackersh.eval(source, namespace)

Evaluate Hackersh code in the context of locals.

Args:
source: A string representing text-based Hackersh code or networkx.DiGraph instance. namespace: A dictionary with components.
Returns:
The return value is the result of the evaluated code.
Raises:
SyntaxError: An error occurred parsing the code.

Questions? Comments?

comments powered by Disqus

Project Versions

Previous topic

Development

Next topic

Hackersh Changelog

This Page