equal
deleted
inserted
replaced
1 #!/usr/bin/env python |
1 #!/usr/bin/env python |
2 # -*- coding: UTF-8 -*- |
2 # -*- coding: UTF-8 -*- |
3 # opyright 2007-2008 VEB IT |
3 # Copyright 2007-2008 VEB IT |
4 # See COPYING for distribution information. |
4 # See COPYING for distribution information. |
5 # $Id$ |
5 # $Id$ |
6 |
6 |
7 """The main class for vmm.""" |
7 """The main class for vmm.""" |
8 |
8 |
30 from Domain import Domain |
30 from Domain import Domain |
31 |
31 |
32 RE_ASCII_CHARS = """^[\x20-\x7E]*$""" |
32 RE_ASCII_CHARS = """^[\x20-\x7E]*$""" |
33 RE_DOMAIN = """^(?:[a-z0-9-]{1,63}\.){1,}[a-z]{2,6}$""" |
33 RE_DOMAIN = """^(?:[a-z0-9-]{1,63}\.){1,}[a-z]{2,6}$""" |
34 RE_LOCALPART = """[^\w!#$%&'\*\+-\.\/=?^_`{\|}~]""" |
34 RE_LOCALPART = """[^\w!#$%&'\*\+-\.\/=?^_`{\|}~]""" |
|
35 RE_MAILLOCATION = """^[\w]{1,20}$""" |
35 re.compile(RE_ASCII_CHARS) |
36 re.compile(RE_ASCII_CHARS) |
36 re.compile(RE_DOMAIN) |
37 re.compile(RE_DOMAIN) |
37 |
38 |
38 ENCODING_IN = sys.getfilesystemencoding() |
39 ENCODING_IN = sys.getfilesystemencoding() |
39 ENCODING_OUT = sys.stdout.encoding or sys.getfilesystemencoding() |
40 ENCODING_OUT = sys.stdout.encoding or sys.getfilesystemencoding() |