VirtualMailManager/Config.py
changeset 136 fb61f64e6351
parent 133 2d5c4745efec
child 138 617f27715b01
--- a/VirtualMailManager/Config.py	Tue Aug 25 12:17:56 2009 +0000
+++ b/VirtualMailManager/Config.py	Mon Aug 31 04:58:45 2009 +0000
@@ -9,23 +9,14 @@
 
 from constants.VERSION import *
 
-import locale
-import sys
 from shutil import copy2
 from ConfigParser import ConfigParser, MissingSectionHeaderError, ParsingError
 from cStringIO import StringIO
 
+from __main__ import ENCODING, w_std
 from Exceptions import VMMConfigException
 import constants.ERROR as ERR
 
-locale.setlocale(locale.LC_ALL, '')
-ENCODING = locale.nl_langinfo(locale.CODESET)
-
-def w_std(*args):
-    for arg in args:
-        sys.stdout.write(arg.encode(ENCODING, 'replace'))
-        sys.stdout.write('\n')
-
 class Config(ConfigParser):
     """This class is for reading and modifying vmm's configuration file."""