有一个系统常驻程序,只允许一个实例运行,使用如下方法

 

 

pro=commands.getoutput("ps -C Dictionary.py | grep -c py")
if pro == "1":   
    app = QtGui.QApplication(sys.argv)
    dict=WinDict()
    dict.show()
    sys.exit(app.exec_())

 

 

相关文章:

  • 2022-03-03
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-26
  • 2022-12-23
  • 2021-06-07
  • 2021-05-31
  • 2022-12-23
相关资源
相似解决方案