QtSingleApplication for PySide or PyQt
问题 Is there a Python version of the C++ class QtSingleApplication from Qt Solutions? QtSingleApplication is used to make sure that there can never be more than one instance of an application running at the same time. 回答1: Here is my own implementation. It has been tested with Python 2.7 and PySide 1.1. It has essentially the same interface as the C++ version of QtSingleApplication. The main difference is that you must supply an application unique id to the constructor. (The C++ version by