I\'m trying to copy files in local network with scp. It\'s working well with filenames without spaces, but it crash with. I\'ve tried to replace \" \" with \"\\ \" as this exemp
Use subprocess module and/or shlex.split():
subprocess
shlex.split()
import subprocess subprocess.call(['scp', file_pc, file_pi])
and you don't need to worry about escaping or quoting anything