[pygtk] Layout of complex app
Thomas Guettler
tguettler at tbz-pariv.de
Thu Jan 29 16:23:57 WST 2009
David Ripton schrieb:
> On 2009.01.28 13:02:39 +0100, Thomas Guettler wrote:
>
>> what layout (directories and classes) do you use for a
>> pygtk project?
...
> I pass it around.
>
> I don't use globals in non-trivial code that also has classes, because
> once you've gone to the bother to use classes then instance variables
> are about as easy to use as globals, and cleaner.
>
> So If I have widget A that depends on widgets B and C, I add B and C as
> instance variables inside A. When possible I set them exactly once in
> A.__init__, to simplify lifespan issues and make the code easier to
> read.
>
>
thank you for this information.
Thomas Güttler
--
Thomas Güttler, http://www.tbz-pariv.de/
Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917
TBZ-PARIV GmbH Geschäftsführer: Dr. Reiner Wohlgemuth
Sitz der Gesellschaft: Chemnitz Registergericht: Chemnitz HRB 8543
More information about the pygtk
mailing list