Hi, I need a suggestion on the better implementation for a very basic task.
I run a program which does some logging on files. I want to collect all the filenames and handlers in the same structure. All the files should be opened at startup, closed at exit, and easily accessed by the rest of the script. I thought of writing a class with the file handlers as objects and opening and closing operations within __init__ and __del__. Then an instance of the class is created at the beginning of the program and used. This works, but isn't it weird to define a class if I know from the very beginning that there will be no more than an instance of that class? Suggestions on this basic OOP task are very appreciated! Thank you, Andrea -- http://mail.python.org/mailman/listinfo/python-list