Updated to use a better python embed method