doc/source/vmm.rst
author Pascal Volk <neverseen@users.sourceforge.net>
Thu, 25 Feb 2010 17:56:08 +0000
branchv0.6.x
changeset 215 33f727efa7c4
parent 212 77ac6f572855
child 216 0c8c053b451c
permissions -rw-r--r--
PEP-8-ified the work of the last days. Renamed methods in class Alias: addDestination() -> add_destination() delDestination() -> del_destination() getDestinations() -> get_destinations() Renamed methods in class Relocated: setDestination() -> set_destination() getInfo() -> get_info() Renamed VMM/constants/VERSION.py -> VMM/constants/version.py Adjusted relevant parts of the documentation.
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
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    28
Functions
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    29
---------
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
.. function:: ace2idna(domainname)
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
  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
    34
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    35
  :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
    36
  :type domainname: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    37
  :rtype: unicode
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
.. function:: check_domainname(domainname)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    40
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    41
  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
    42
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    43
  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
    44
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    45
  :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
    46
  :type domainname: :obj:`basestring`
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    47
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    48
  :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
    49
    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
    50
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    51
.. function:: check_localpart(localpart)
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 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
    54
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    55
  :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
    56
  :type localpart: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    57
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    58
  :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
    59
    long or contains invalid characters.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    60
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    61
.. function:: exec_ok(binary)
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
  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
    64
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    65
  :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
    66
  :type binary: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    67
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    68
  :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
    69
    or is not executable.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    70
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    71
.. function:: expand_path(path)
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
  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
    74
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    75
  :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
    76
  :type path: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    77
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    78
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    79
.. function:: get_unicode(string)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    80
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    81
  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
    82
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    83
  :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
    84
  :type string: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    85
  :rtype: unicode
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
.. function:: idn2ascii(domainname)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    88
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    89
  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
    90
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    91
  :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
    92
  :type domainname: unicode
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    93
  :rtype: str
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
.. function:: is_dir(path)
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    96
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    97
  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
    98
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    99
  :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
   100
  :type path: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   101
  :rtype: str
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   102
  :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
   103
    directory.
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   104
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   105
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   106
Examples
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   107
--------
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   108
212
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   109
  >>> from VirtualMailManager import *
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   110
  >>> ace2idna('xn--pypal-4ve.tld')
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   111
  u'p\u0430ypal.tld'
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   112
  >>> idn2ascii(u'öko.de')
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   113
  'xn--ko-eka.de'
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   114
  >>> check_domainname(u'pаypal.tld')
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   115
  'xn--pypal-4ve.tld'
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   116
  >>> check_localpart('john.doe')
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   117
  'john.doe'
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   118
  >>> exec_ok('usr/bin/vim')
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   119
  Traceback (most recent call last):
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   120
    File "<stdin>", line 1, in <module>
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   121
    File "./VirtualMailManager/__init__.py", line 93, in exec_ok
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   122
      NO_SUCH_BINARY)
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   123
  VirtualMailManager.Exceptions.VMMException: 'usr/bin/vim' is not a file
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   124
  >>> exec_ok('/usr/bin/vim')
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   125
  '/usr/bin/vim'
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   126
  >>> expand_path('.')
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   127
  '/home/user/hg/vmm'
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   128
  >>> get_unicode('hello world')
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   129
  u'hello world'
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   130
  >>> is_dir('~/hg')
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   131
  '/home/user/hg'
77ac6f572855 doc: extended documentation.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 209
diff changeset
   132
  >>> 
209
c705a9e38962 VMM{/Config}: reduced docstrings. Added doc to the repository.
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   133