如何解决用python提取双引号文件夹中的rar文件
嗨,我如何将双引号添加到文件夹中?有首字母“和韵母”?在 python 文件中没有收到错误?
这是带引号的bat文件
print("Hello and welcome to the Virgin Club Adventure Game! The main objective of this game is to befriend every "
"member of the Virgin Club. \n But before we start...")
user_name = input("Please tell us your name:")
user_age = int(input("And your age:"))
friendship_points: str(2)
if user_age >= 13:
print("Great! You're old enough to play the game.")
start = input("Shall we begin? (yes/no) ")
***if start == "yes":
left_or_right = input("A path diverges before you. \n To your left,the path leads to a small forest in the "
"woods. \n To the right,the path leads to a bustling city. \n Where do you want to go? "
"(left/right)")
if left_or_right == "left":
print("You head down the path and towards the cottage.")
elif left_or_right == "right":
print("You know no one in the city. You look around for a familiar face,to no avail. A car hits you as "
"you try to cross the road. You die alone,with no virgins beside you. \n Game Over!")
else:
print("Choose an actual path,you &*(%!")
else:
print("Alright then. Come back when you have better taste!")***
else:
print("You're too young to play. Scram,ankle biter!")
这是没有引号的python文件
rar.exe x -o+ -p12345pass temp.rar "%Localappdata%\Temp\"
解决方法
使用单引号也可以帮助您:
win32api.WinExec('cmd.exe /c rar.exe x -o+ -p12345pass temp.rar \"%Localappdata%\\Temp\\\"',0)
,
在每个引号前使用一个反斜杠
win32api.WinExec("cmd.exe /c rar.exe x -o+ -p12345pass temp.rar \"%Localappdata%\\Temp\\\"",0)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。