Is there a way to convert Linux style shell substitutions to Windows substitutions in Python?
Let's say there's a command in a Linux environment:
my_command=cd
${my_command} .. OR $my_command .. resolves to cd ..
In Windows:
SET my_command=cd
%my_command% .. resolves to cd ..
I want it so that if my environment is Windows, then I could take in a command and replace it with the Windows style substitution:
Sample input/output:
input: python myscript.py "${my_command}
output: "%my_command%"
Thanks!