linux popup message window

On Linux, you can use Python subprocessmodules to call system commands notify-sendto pop up message windows. notify-sendIt is a command line program that comes with the Linux system and is used to send notifications to the desktop. The following is a sample code that uses subprocessthe module call notify-sendcommand to pop up a message window:

 
 

pythonCopy code

import subprocess # 弹出消息窗体 subprocess.run(['notify-send', 'Title', 'Message'])

Among them, "Title"is the title of the message form, "Message"and is the content of the message form. Running this code on a Linux system will pop up a system-level message window.

Guess you like

Origin blog.csdn.net/ihateright/article/details/131235301