major rewrite: now generating directly python bytecode