标签: python linux raspberry-pi screen
我想用一些 Python 代码打开和关闭我的显示器。我能够做到 os.system("xset -display :0 dpms force off") 但由于我试图禁用 /boot/cmdline.txt 中的自动超时,它现在根本不起作用。当我尝试使用 os.system("xset -display :0 dpms force off") 时,它告诉我它不知道“力”。有人知道如何处理这种情况吗?
os.system("xset -display :0 dpms force off")
/boot/cmdline.txt