Reorganized module import.
Dropped the import of constants.VERSION, when it wasn't really needed.
Centralized the import of os, re and locale in VirtualMailManager/__init__.py.
Also moved w_std() and w_err() from vmm to the __init__.py.
# -*- coding: UTF-8 -*-# Copyright (c) 2007 - 2009, VEB IT# See COPYING for distribution information.# package initialization code#importosimportreimportlocalefromconstants.VERSIONimport*importconstants.ERRORasERR# Set all of the locales according to the current environment variables# and get the character encoding.locale.setlocale(locale.LC_ALL,'')ENCODING=locale.nl_langinfo(locale.CODESET)defw_std(*args):"""Writes each arg of args, encoded in the current ENCODING, to stdout and appends a newline."""forarginargs:os.sys.stdout.write(arg.encode(ENCODING,'replace'))os.sys.stdout.write('\n')defw_err(code,*args):"""Writes each arg of args, encoded in the current ENCODING, to stderr and appends a newline. This function additional interrupts the program execution and uses 'code' system exit status."""forarginargs:os.sys.stderr.write(arg.encode(ENCODING,'replace'))os.sys.stderr.write('\n')os.sys.exit(code)__all__=[# imported modules'os','re','locale',# version information from VERSION'__author__','__date__','__version__',# error codes'ERR',# defined stuff'ENCODING','w_std','w_err']# EOF