Python Keep Named Pipe Open
Question: In bash, a named pipe can be kept open with `cat > mypipe`. How can this be
done in python? This is what I have so far:

    
    
    import subprocess
    import os
    
    if not os.path.exists("/tmp/mypipe"):
        os.mkfifo("/tmp/mypipe")
    


Answer: 
    import os
    import subprocess
    
    path = '/tmp/mypipe'
    if not os.path.exists(path):
        os.mkfifo(path)
    
    with open(path, 'w') as f:
        subprocess.call(['cat'], stdout=f)
    

