在python中将变量传递给os.system
调用时遇到问题。我有以下代码:
f1 = open("package.txt","r+")
for i in f1:
os.system("adb shell dumpsys package %s" %i)
在我的package.txt
中,我有以下内容:
我想在系统操作系统但不幸的是,我不能让它按预期工作。运行时代码会给我错误
TypeError:must be string without null bytes, not str
我看过其他关于stackoverflow的论坛/问题,他们说要在os.system
调用的开头添加一个“r”,但不幸的是,这不起作用。在
目前没有回答
相关问题 更多 >
编程相关推荐