Trees | Indices | Help |
|
---|
|
object --+ | SingleInstance
SingleInstance(port)
Construct this when your app starts, to initiate communication with any duplicates. If it is the only instance, this will start a background server, and pass any args to mySingleInstance.OnArg(arg). If there is an existing instance, this will pass sys.argv[1:] to it.
It is your responsibility to check if mySingleInstance.duplicate, and quit.
example:
>>> import sys, qubx.singleInstance >>> mySingleInstance = qubx.singleInstance.SingleInstance(MY_APPS_HIGH_PORT_NUMBER) >>> if mySingleInstance.duplicate: ... sys.exit(0) >>> print sys.argv[1:]
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
OnArg | |||
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
|
OnArg
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Dec 15 19:07:38 2017 | http://epydoc.sourceforge.net |