os.path.expandvars()

os.path.expandvars(path)

Return the argument with environment variables expanded. Substrings of the form $name or ${name} are replaced by the value of environment variable name. Malformed variable names and references to non-existing variables are left unchanged.

On Windows, %name% expansions are supported in addition to $name and ${name}.

doc_python
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.