Dynamic compilation
Compilers are built-in components of Parrot
$S0 = "...my python program..." $P0 = compreg 'Python' # get the Python compiler $P1 = $P0.'compile'($S0) # compile code in $S0 $P1() # execute it
or
freeze "myprog.pbc", $P1 # save bytecode to disk