PyShift's purpose is to translate between python code and any other programming language. It does so by inspecting the bytecode (generated by the compile() function) and invoking a callback for each statement or expression it finds (like "def" or "if").