VirtualMailManager/cli/__init__.py
branchv0.6.x
changeset 340 4515afec62e5
parent 320 011066435e6f
child 366 d6573da35b5f
equal deleted inserted replaced
339:abff2de9eed0 340:4515afec62e5
    17 from VirtualMailManager import ENCODING
    17 from VirtualMailManager import ENCODING
    18 from VirtualMailManager.constants import VMM_TOO_MANY_FAILURES
    18 from VirtualMailManager.constants import VMM_TOO_MANY_FAILURES
    19 from VirtualMailManager.errors import VMMError
    19 from VirtualMailManager.errors import VMMError
    20 
    20 
    21 
    21 
    22 __all__ = ('get_winsize', 'read_pass', 'w_err', 'w_std')
    22 __all__ = ('prog', 'get_winsize', 'read_pass', 'w_err', 'w_std')
    23 
    23 
    24 _ = lambda msg: msg
    24 _ = lambda msg: msg
    25 _std_write = os.sys.stdout.write
    25 _std_write = os.sys.stdout.write
    26 _err_write = os.sys.stderr.write
    26 _err_write = os.sys.stderr.write
       
    27 prog = os.path.basename(os.sys.argv[0])
    27 
    28 
    28 
    29 
    29 def w_std(*args):
    30 def w_std(*args):
    30     """Writes a line for each arg of *args*, encoded in the current
    31     """Writes a line for each arg of *args*, encoded in the current
    31     ENCODING, to stdout.
    32     ENCODING, to stdout.