withenv

withenv(f::Function, kv::Pair...)

Execute f() in an environment that is temporarily modified (not replaced as in setenv) by zero or more "var"=>val arguments kv. withenv is generally used via the withenv(kv...) do ... end syntax. A value of nothing can be used to temporarily unset an environment variable (if it is set). When withenv returns, the original environment has been restored.

Examples

See Also

addprocs, atexit, cd, clipboard, EnvHash, exit, getpid, peakflops, ProcessExitedException, process_exited, process_running, procs, quit, readandwrite, redirect_stdout, rmprocs, run, setenv, spawn, withenv,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: