Toolbox/SingleApplication.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2302
f29e9405c851
child 3057
10516539f238
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the single application server and client. 7 Module implementing the single application server and client.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
9 11
10 from PyQt4.QtNetwork import QLocalServer, QLocalSocket 12 from PyQt4.QtNetwork import QLocalServer, QLocalSocket
11 13
12 14
13 class SingleApplicationServer(QLocalServer): 15 class SingleApplicationServer(QLocalServer):
18 """ 20 """
19 Constructor 21 Constructor
20 22
21 @param name name this server is listening to (string) 23 @param name name this server is listening to (string)
22 """ 24 """
23 super().__init__() 25 super(SingleApplicationServer, self).__init__()
24 26
25 res = self.listen(name) 27 res = self.listen(name)
26 if not res: 28 if not res:
27 # maybe it crashed last time 29 # maybe it crashed last time
28 self.removeServer(name) 30 self.removeServer(name)

eric ide

mercurial