Greetings, program! This is to announce the first public release of mode.py, a small utility module that models the life-cycle of an application as a series of four modes: debugging, development, staging, and production.
Quick start: $ easy_install mode.py ... $ python ... >>> import mode >>> mode.development # the default True >>> mode.set('production') >>> mode.staging_or_production True >>> The mode is taken from the PYTHONMODE environment variable. A more illustrative example: import mode if mode.DEVELOPMENT_OR_DEBUGGING: db = "mysql://localhost:3306/test" elif mode.STAGING: db = "mysql://dbserver:33000/staging" elif mode.PRODUCTION: db = "mysql://dbserver:33000/live" For full documentation and downloads, see the project homepage: http://www.zetadev.com/software/mode.py/ Thanks. yours, Chad Whitacre http://www.zetadev.com/ -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html