doc/source/vmm.rst
branchv0.6.x
changeset 212 77ac6f572855
parent 209 c705a9e38962
child 215 33f727efa7c4
equal deleted inserted replaced
211:0b129678cfe1 212:77ac6f572855
   116 
   116 
   117 
   117 
   118 Examples
   118 Examples
   119 --------
   119 --------
   120 
   120 
   121     >>> from VirtualMailManager import *
   121   >>> from VirtualMailManager import *
   122     >>> ace2idna('xn--pypal-4ve.tld')
   122   >>> ace2idna('xn--pypal-4ve.tld')
   123     u'p\u0430ypal.tld'
   123   u'p\u0430ypal.tld'
   124     >>> idn2ascii(u'öko.de')
   124   >>> idn2ascii(u'öko.de')
   125     'xn--ko-eka.de'
   125   'xn--ko-eka.de'
   126     >>> check_domainname(u'pаypal.tld')
   126   >>> check_domainname(u'pаypal.tld')
   127     'xn--pypal-4ve.tld'
   127   'xn--pypal-4ve.tld'
   128     >>> check_localpart('john.doe')
   128   >>> check_localpart('john.doe')
   129     'john.doe'
   129   'john.doe'
   130     >>> exec_ok('usr/bin/vim')
   130   >>> exec_ok('usr/bin/vim')
   131     Traceback (most recent call last):
   131   Traceback (most recent call last):
   132       File "<stdin>", line 1, in <module>
   132     File "<stdin>", line 1, in <module>
   133       File "./VirtualMailManager/__init__.py", line 93, in exec_ok
   133     File "./VirtualMailManager/__init__.py", line 93, in exec_ok
   134         NO_SUCH_BINARY)
   134       NO_SUCH_BINARY)
   135     VirtualMailManager.Exceptions.VMMException: 'usr/bin/vim' is not a file
   135   VirtualMailManager.Exceptions.VMMException: 'usr/bin/vim' is not a file
   136     >>> exec_ok('/usr/bin/vim')
   136   >>> exec_ok('/usr/bin/vim')
   137     '/usr/bin/vim'
   137   '/usr/bin/vim'
   138     >>> expand_path('.')
   138   >>> expand_path('.')
   139     '/home/user/hg/vmm'
   139   '/home/user/hg/vmm'
   140     >>> get_unicode('hello world')
   140   >>> get_unicode('hello world')
   141     u'hello world'
   141   u'hello world'
   142     >>> is_dir('~/hg')
   142   >>> is_dir('~/hg')
   143     '/home/user/hg'
   143   '/home/user/hg'
   144     >>> 
   144   >>> 
   145 
   145