Skip to main content

Python Pipe

Pipes can be used in python using the popen command. os.popen(command[, mode[, bufferSize]]). The default mode is read which can also be explicitly indicated by "r" as shown in the example below. The parameter bufferSize can be 0 (no buffering), 1 (line buffering), negative(system default buffering) and positive values greater than 1 (number defines the buffer size to be used).

Comments