I ve been trying to delete all the "\" from my string in python but it seems it is not working.The object is initially a bytes type and I converted it to string before trying the following methods :
str(self.solution).string("\\")
str(self.solution).replace("\\","")
am i doing something wrong here ? both methods didn´t work. This is the code I am using :
cmd = ( "cd ~/rubiks-cube-NxNxN-solver/; ./usr/bin/rubiks-cube-solver.py --colormap '%s' --state %s"
% (json.dumps(colormap), kociemba_string)
)
log.info(cmd)
output = check_output(cmd, shell=True)
for line in output.splitlines():
self.solution = line.strip()
if self.size >= 4:
self.solution = (
"See /tmp/rubiks-cube-NxNxN-solver/index.html"
)
print(self.solution)
sendSolutionToArduino(self.solution[10:])