SyntaxFix
Write A Post
Hire A Developer
Questions
you might use my_env.get("PATH", '') instead of my_env["PATH"] in case PATH somehow not defined in the original environment, but other than that it looks fine.
my_env.get("PATH", '')
my_env["PATH"]
PATH