I am doing a webcam project and i tried to use c# to run a python script with a location variable passed to python so i can keep changing the opening/saving location of the images.
This is used to pass the location of the opening of image to do a cropping.
string loca = File.ReadAllText("cropface.py").Replace("%location%", "C:\\Users\\L31101\\Desktop\\Camera\\Camera\\bin\\Debug\\center\\center.jpg");
File.WriteAllText("cropface.py", loca);
However my python script receive the location without 2 backslash
image = Image.open("C:\Users\L31101\Desktop\Camera\Camera\bin\Debug\center\center.jpg")
Therefore, i tried passing forward slash instead of 2 backslash however my python script still receive 1 backslash.
Any idea how to go around it?