Tutorial's ports example is replicated with pexpect