doc/source/vmm.rst
author Pascal Volk <neverseen@users.sourceforge.net>
Mon, 22 Feb 2010 10:20:46 +0000
branchv0.6.x
changeset 209 c705a9e38962
child 212 77ac6f572855
permissions -rw-r--r--
VMM{/Config}: reduced docstrings. Added doc to the repository.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
209
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     1
:mod:`VirtualMailManager` ---  Initialization code and some functions
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     2
=====================================================================
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     3
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     4
.. module:: VirtualMailManager
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     5
  :synopsis: Initialization code and some functions
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     6
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     7
.. moduleauthor:: Pascal Volk <neverseen@users.sourceforge.net>
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     8
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     9
.. toctree::
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    10
   :maxdepth: 2
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    11
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    12
When the VirtualMailManager module, or one of its sub modules, is imported,
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    13
the following actions will be performed:
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    14
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    15
  - :func:`locale.setlocale` (with :const:`locale.LC_ALL`) is called, to set
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    16
    :const:`ENCODING`
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    17
  - :func:`gettext.install` is called, to have 18N support.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    18
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    19
Constants and data
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    20
------------------
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    21
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    22
.. data:: ENCODING
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    23
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    24
  The systems current character encoding, e.g. ``'UTF-8'`` or
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    25
  ``'ANSI_X3.4-1968'`` (aka ASCII).
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    26
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    27
.. data:: __author__
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    28
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    29
  The author's name
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    30
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    31
.. data:: __date__
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    32
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    33
  The release date
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    34
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    35
.. data:: __version__
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    36
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    37
  VirtualMailManager's version
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    38
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    39
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    40
Functions
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    41
---------
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    42
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    43
.. function:: ace2idna(domainname)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    44
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    45
  Converts the idn domain name *domainname* into punycode.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    46
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    47
  :param domainname: the domain-ace representation (``xn--…``)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    48
  :type domainname: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    49
  :rtype: unicode
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    50
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    51
.. function:: check_domainname(domainname)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    52
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    53
  Returns the validated domain name *domainname*.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    54
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    55
  It also converts the name of the domain from IDN to ASCII, if necessary.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    56
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    57
  :param domainname: the name of the domain
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    58
  :type domainname: :obj:`basestring`
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    59
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    60
  :raise VirtualMailManager.Exceptions.VMMException: if the domain name is
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    61
    too long or doesn't look like a valid domain name (label.label.label).
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    62
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    63
.. function:: check_localpart(localpart)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    64
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    65
  Returns the validated local-part *localpart* of an e-mail address.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    66
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    67
  :param localpart: The local-part of an e-mail address.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    68
  :type localpart: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    69
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    70
  :raise VirtualMailManager.Exceptions.VMMException: if the local-part is too
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    71
    long or contains invalid characters.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    72
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    73
.. function:: exec_ok(binary)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    74
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    75
  Checks if the *binary* exists and if it is executable.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    76
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    77
  :param binary: path to the binary
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    78
  :type binary: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    79
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    80
  :raise VirtualMailManager.Exceptions.VMMException: if *binary* isn't a file
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    81
    or is not executable.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    82
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    83
.. function:: expand_path(path)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    84
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    85
  Expands paths, starting with ``.`` or ``~``, to an absolute path.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    86
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    87
  :param path: Path to a file or directory
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    88
  :type path: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    89
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    90
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    91
.. function:: get_unicode(string)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    92
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    93
  Converts `string` to `unicode`, if necessary.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    94
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    95
  :param string: The string taht should be converted
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    96
  :type string: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    97
  :rtype: unicode
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    98
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    99
.. function:: idn2ascii(domainname)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   100
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   101
  Converts the idn domain name *domainname* into punycode.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   102
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   103
  :param domainname: the unicode representation of the domain name
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   104
  :type domainname: unicode
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   105
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   106
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   107
.. function:: is_dir(path)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   108
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   109
  Checks if *path* is a directory.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   110
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   111
  :param path: Path to a directory
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   112
  :type path: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   113
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   114
  :raise VirtualMailManager.Exceptions.VMMException: if *path* is not a
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   115
    directory.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   116
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   117
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   118
Examples
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   119
--------
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   120
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   121
    >>> from VirtualMailManager import *
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   122
    >>> ace2idna('xn--pypal-4ve.tld')
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   123
    u'p\u0430ypal.tld'
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   124
    >>> idn2ascii(u'öko.de')
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   125
    'xn--ko-eka.de'
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   126
    >>> check_domainname(u'pаypal.tld')
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   127
    'xn--pypal-4ve.tld'
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   128
    >>> check_localpart('john.doe')
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   129
    'john.doe'
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   130
    >>> exec_ok('usr/bin/vim')
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   131
    Traceback (most recent call last):
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   132
      File "<stdin>", line 1, in <module>
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   133
      File "./VirtualMailManager/__init__.py", line 93, in exec_ok
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   134
        NO_SUCH_BINARY)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   135
    VirtualMailManager.Exceptions.VMMException: 'usr/bin/vim' is not a file
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   136
    >>> exec_ok('/usr/bin/vim')
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   137
    '/usr/bin/vim'
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   138
    >>> expand_path('.')
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   139
    '/home/user/hg/vmm'
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   140
    >>> get_unicode('hello world')
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   141
    u'hello world'
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   142
    >>> is_dir('~/hg')
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   143
    '/home/user/hg'
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   144
    >>> 
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   145