2024-06-08 07:05:51 发布
网友
我正在尝试编写一个简单的Python IRC客户端。到目前为止,我可以读取数据,如果自动化的话,我可以将数据发送回客户机。我在while True中获取数据,这意味着在读取数据的同时不能输入文本。如何在控制台中输入文本,该文本只在按enter键时发送,同时运行无限循环?
while True
基本代码结构:
while True: read data #here is where I want to write data only if it contains '/r' in it
目前没有回答
目前没有回答
相关问题 更多 >
编程相关推荐