PyCharm Says readline Import Not Being Used
问题 I had this code: while True: cmd = input('> ') if cmd == 'exit': break But I wanted to implement advanced text input features like command history so I imported the readline module. Importing the readline module (and not even using it) will unlock these features. This code works perfectly: import readline while True: cmd = input('> ') if cmd == 'exit': break My problem (or maybe just annoyance) is that PyCharm gives me a non-fatal warning that I have an unused import statement. I assume this