On 2/13/22, Paul Moore <p.f.mo...@gmail.com> wrote: > > For better or worse, though, Windows (as an OS) doesn't have a "normal > behaviour". %-expansion is a feature of CMD and .bat files, which
You're overlooking ExpandEnvironmentStringsW() [1], ExpandEnvironmentStringsForUserW(), and PathUnExpandEnvStringsW() [2], which provide basic support for `%` based environment variables in strings. Python's standard library supports winreg.ExpandEnvironmentStrings(). It is critical that the system supports this functionality in order to evaluate REG_EXPAND_SZ values in the registry. [1] https://docs.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-expandenvironmentstringsw [2] https://docs.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathunexpandenvstringsw _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/SNZVO3OAF5CZFALNQN6XIQRCJVN2NZ75/ Code of Conduct: http://python.org/psf/codeofconduct/