Update pipe.py

Added (rudimentary) support for IO functions