문제

I frequently edit Python code using IDLE and occasionally when I perform a Save I receive an I/O Warning.

enter image description here

I am assuming that I have inadvertently added a Non-ASCII character, and I do not really want to declare the cp1252 encoding.

Is there an easy way to find and delete the Non-ASCII that the Warning relates to?

The OS Version involved is Windows 7, and the Python version is 2.6.5

도움이 되었습니까?

해결책

The regex [^ -~] will match anything except printing ASCII characters. It should be able to find your stray non-ASCII character.

Use it with IDLE's Search dialogue (Ctrl + F, or Edit → Find); it can search by regex:

search

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top