if PYPYLOG is a filename, we log to it (except debug_print) if PYPYLOG is :filename, we log debug_print as well if PYPYLOG is section:filename, we log only that section But : is a valid char for filename on windows, so something like PYPYLOG=C:\TEMP\log.log does the wrong thing, and even worse, does so silently. Matti