def env_to_dict(env, pathsep=os.pathsep):
out_dict = {}<EOL>for k, v in env.iteritems():<EOL><INDENT>if pathsep in v:<EOL><INDENT>out_dict[k] = v.split(pathsep)<EOL><DEDENT>else:<EOL><INDENT>out_dict[k] = v<EOL><DEDENT><DEDENT>return out_dict<EOL>
Convert a dict containing environment variables into a standard dict.
Variables containing multiple values will be split into a list based on
the argument passed to pathsep.

:param env: Environment dict like os.environ.data
:param pathsep: Path separator used to split variables