Why does os.path.exists() stop windows named pipes from connecting?
问题 It seems that a successful test of the existence of a windows named pipe by using os.path.exists() prevents the pipe from working. Why would this be? Here is successfully working windows named-pipe code: import time import multiprocessing as mp import win32pipe, win32file PIPENAME = r'\\.\pipe\Foo' def producer(pipe_name: str): print('producer') # if not os.path.exists(pipe_name): # print(f'No pipe {pipe_name}') # return pipe = win32file.CreateFile(pipe_name, win32file.GENERIC_READ |