Os Popen
# Python2.x Python os.popen() Method
[ Python OS File/Directory Methods](#)
* * *
### Overview
The os.popen() method is used to open a pipe from a command.
Available on Unix and Windows.
### Syntax
The syntax format of the **popen()** method is as follows:
os.popen(command[, mode[, bufsize]])
### Parameters
* **command** -- The command to use.
* **mode** -- The mode permission can be 'r' (default) or 'w'.
* **bufsize** -- Indicates the buffer size required by the file: 0 means unbuffered; 1 means line buffered; other positive values indicate using a buffer of the parameter size (approximate value, in bytes). A negative bufsize means using the system default value. Generally, for tty devices, it is line buffered; for other files, it is fully buffered. If this parameter is not provided, the system default value is used.
### Return Value
Returns an open file object with the file descriptor
YouTip