Re: [PyQt] Singelton from QObject

2007-05-23 Thread Nahuel Defossé
El Wednesday 23 May 2007 08:09:15 Paul Giannaros escribió: > On Wednesday 23 May 2007 05:53:58 Nahuel Defossé wrote: > > I saw in ActiveState page the folowing code to make a singleton: > > class Borg: > > __shared_state = {} > > def __init__(self): > > self.__dict__ = self.__shared

Re: [PyQt] Singelton from QObject

2007-05-23 Thread Paul Giannaros
On Wednesday 23 May 2007 05:53:58 Nahuel Defossé wrote: > I saw in ActiveState page the folowing code to make a singleton: > class Borg: > __shared_state = {} > def __init__(self): > self.__dict__ = self.__shared_state > # and whatever else you want in your class -- that's all!

[PyQt] Singelton from QObject

2007-05-22 Thread Nahuel Defossé
I saw in ActiveState page the folowing code to make a singleton: class Borg: __shared_state = {} def __init__(self): self.__dict__ = self.__shared_state # and whatever else you want in your class -- that's all! And in all Qt classes I customize via inheritance I do the folowing