def __init__(self, name, end=0, mode=0o666):
        """Open a pair of pipes, name.in and name.out for communication
        with another process.  One process should pass 1 for end, and the
        other 0.  Data is marshalled with pickle."""
        self.in_name, self.out_name = name +'.in',  name +'.out',
        try: os.mkfifo(self.in_name,mode)
        except OSError: pass
        try: os.mkfifo(self.out_name,mode)
        except OSError: pass
        
        # NOTE: The order the ends are opened in is important - both ends
        # of pipe 1 must be opened before the second pipe can be opened.
        if end:
            self.inp = open(self.out_name,'r')
            self.out = open(self.in_name,'w')
        else:
            self.out = open(self.out_name,'w')
            self.inp = open(self.in_name,'r')
        self._open = True
def __init__ ( self , name , end = 0 , mode = 0o666 ) : self . in_name , self . out_name = name + '.in' , name + '.out' , try : os . mkfifo ( self . in_name , mode ) except OSError : pass try : os . mkfifo ( self . out_name , mode ) except OSError : pass if end : self . inp = open ( self . out_name , 'r' ) self . out = open ( self . in_name , 'w' ) else : self . out = open ( self . out_name , 'w' ) self . inp = open ( self . in_name , 'r' ) self . _open = True
Open a pair of pipes, name.in and name.out for communication
        with another process.  One process should pass 1 for end, and the
        other 0.  Data is marshalled with pickle.