'Create a named pipe with the given name.
:param pipe_name(Optional): string representing the name of the pipe
which should be used to create the named pipe
:param sec_attributes(Optional): type win32security.SECURITY_ATTRIBUTES
The default value is -1 which uses the default security attributes.
This means that the named pipe handle is inherited when a new
process is created.'

def __init__(self, pipe_name=None, sec_attributes=(-1)):

    self._read = ovs_winutils.pywintypes.OVERLAPPED()
    self._read.hEvent = ovs_winutils.get_new_event()
    self._read_pending = False
    if (pipe_name is None):
        pipe_name = ('NamedPipe_%d_%s' % (time.time(), str(random.random()).split('.')[1]))
    self.name = ovs_winutils.get_pipe_name(pipe_name)
    self.namedpipe = ovs_winutils.create_named_pipe(self.name, saAttr=sec_attributes)
    self._npipe_file = None
    if (not self.namedpipe):
        raise NamedPipeException('Failed    to    create    named    pipe.')
