关于python和shell 特殊字符"\"转译



\" shell取消转译,例如:\"..\"
r""  python取消转译  r“...\...\”

运行:
cmd = r"adb shell at_cmd 'AT+CLCK=\"SC\",1,\"1234\"'"
print(cmd)
content = os.popen(cmd)
for i in content.readlines():
print(i)


结果:

adb shell at_cmd 'AT+CLCK=\"SC\",1,\"1234\"'
AT+CLCK="SC",1,"1234"

OK

 
posted @ 2020-09-08 17:44  Bambooboo  阅读(541)  评论(0编辑  收藏  举报