这种作法是错误的。
文档中对ready()的说明:
True if the next read() is guaranteed not to block for input, false otherwise. Note that returning false does not guarantee that the next read will block.即使数据流现在是阻塞状态也不能就判断Welcome信息读取完了。Welcome信息是以什么方式结束应该看FTP协议的规定。比如:两个回车换行符号“\r\n\r\n”表示结束。