R/pithon.exec.R

Defines functions pithon.exec

Documented in pithon.exec

pithon.exec <- function( python.code, get.exception = TRUE, instance.name = "" )
{
	python.code <- paste( python.code, collapse = "\n" )

	ret <- .C( "py_exec_code", python.code, instance.name, exit.status = integer(1), message = character(1), PACKAGE = "rPithon" )
	if (!get.exception)
		return(ret$exit.status)

	if (ret$exit.status != 0)
		stop(ret$message)

	invisible(NULL)
}

Try the rPithon package in your browser

Any scripts or data that you put into this service are public.

rPithon documentation built on May 2, 2019, 5:51 p.m.