Re: Pattern question

2005-07-09 Thread cantabile
Scott David Daniels a écrit : > cantabile wrote: > >> bruno modulix a écrit : >> >>> You may want to have a look at the Factory pattern... >>> ... demo of class Factory ... > > > Taking advantage of Python's dynamic nature, you could simply: > # similarly outrageously oversimplified dummy ex

Re: Pattern question

2005-07-08 Thread Scott David Daniels
cantabile wrote: > bruno modulix a écrit : >>You may want to have a look at the Factory pattern... >> ... demo of class Factory ... Taking advantage of Python's dynamic nature, you could simply: # similarly outrageously oversimplified dummy example class Gui(object): def __init__

Re: Pattern question

2005-07-08 Thread cantabile
bruno modulix a écrit : > You may want to have a look at the Factory pattern... > > # outrageously oversimplified dummy exemple > class Gui(object): >def __init__(self, installer): > self.installer = installer > > class PosixGui(Gui): >pass > > class Win32Gui(Gui): >pass > > c

Re: Pattern question

2005-07-08 Thread bruno modulix
cantabile wrote: > Hi, > > I'm trying to write a small installer for a server. But this program > should be able to run in the future under heterogenous environments and > os (at least linux/windows). I mean, the install will be done either in > text mode or curses or gtk or tk, either in debian o