some work to remove inline python with the stdout capturing