> On 18 Aug 2025, at 18:34, Henning Hraban Ramm <te...@fiee.net> wrote: > > I guess that was what I was asking for, but not what I needed.
I'm still confused as to what you're actually trying to do! 1) Do you want a list of all environment variables that are set? If so and your target system is Unix-like, then there is the command `printenv` that you could call via os.execute("printenv"). or 2) Do you want process a string containing a file path where some of the components might be environment variables and you want to expand them the way the shell would? If so then there is a Posix function `wordexp` (man 3 wordexp) which does that. You'll need to wrap it in a C API call. Regards, — Bruce Horrocks Hampshire, UK ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________