On 2006-02-19, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: Bonjour,
> > 1/ learn OO and get rid of globals. Well I created two classes now. I put some things global (your point 6). e.g. if it's on Windows or not, and other things. > 2/ use dict or list based dispatch instead of long if/elif/elif... clauses when I find out what you mean, I will. Probably something lika a 'case' thing? #python meant a list containing functions or so. So that the values represent the functions to call, isn 'it? > 3/ stdout is meant for *normal* program outputs. Errors and verbosity go > to stderr yeah, changed (somebit) > 4/ triple quoted strings are fine for multiline text yeah. I have lot of triple prints... > 5/ os.path is fine for portable filepath operations I don't really understant what you mean here, sorry > 6/ things that dont change during program execution (ie : constants) > should not be defined inside a function As I mentioned above, these I placed globally: main gtkwindows, smwin or not, pyexe or not, preferred encoging according to your statement? Anyway, since I did lot of changes, I'm myself confused actually. http://calmar.ws/tmp/cal.html Will try to cleanup and implement even further all good advices from all in some days. Thanks a lot!! calmar -- calmar (o_ It rocks: LINUX + Command-Line-Interface //\ V_/_ http://www.calmar.ws -- http://mail.python.org/mailman/listinfo/python-list