after this sectionwe'll also study the multiprocessing modulewhich offers additional and portable ipc options as part of its general process-launching apiincluding shared memoryand pipes and queues of arbitrary pickled python objects for nowlet' study traditional approaches first anonymous pipes pipesa cross-program communication deviceare implemented by your operating system and made available in the python standard library pipes are unidirectional channels that work something like shared memory bufferbut with an interface resembling simple file on each of two ends in typical useone program writes data on one end of the pipeand another reads that data on the other end each program sees only its end of the pipes and processes it using normal python file calls pipes are much more within the operating systemthough for instancecalls to read pipe will normally block the caller until data becomes available ( is sent by the program on the other endinstead of returning an end-of-file indicator moreoverread calls on pipe always return the oldest data written to the piperesulting in first-infirst-out model--the first data written is the first to be read because of such propertiespipes are also way to synchronize the execution of independent programs pipes come in two flavors--anonymous and named named pipes (often called fifosare represented by file on your computer because named pipes are really external filesthe communicating processes need not be related at allin factthey can be independently started programs by contrastanonymous pipes exist only within processes and are typically used in conjunction with process forks as way to link parent and spawned child processes within an application parent and child converse over shared pipe file descriptorswhich are inherited by spawned processes because threads run in the same process and share all global memory in generalanonymous pipes apply to them as well anonymous pipe basics since they are more traditionallet' start with look at anonymous pipes to illustratethe script in example - uses the os fork call to make copy of the calling process as usual (we met forks earlier in this after forkingthe original parent process and its child copy speak through the two ends of pipe created with os pipe prior to the fork the os pipe call returns tuple of two file descriptors--the low-level file identifiers we met in --representing the input and output sides of the pipe because forked child processes get copies of their parentsfile descriptorswriting to the pipe' output descriptor in the child sends data back to the parent on the pipe created before the child was spawned parallel system tools