'Setup a stream connection.
This connection will be used by the routines:
read, readline, send, shutdown.'

def open(self, host=None, port=None):

    self.host = None
    self.port = None
    self.sock = None
    self.file = None
    self.process = subprocess.Popen(self.command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True, close_fds=True)
    self.writefile = self.process.stdin
    self.readfile = self.process.stdout
