On 12/23/2014 10:24 AM, pypythotho wrote:
In Command Prompt, 'python -m idlelib' helped me to dicover the
problem source. An explicit message told that an indentation was
insconsistant in the file ntpath.py I modified previously with
notepad++. I replaced a tab by 4 spaces and IDLE run again like a
charm.

[It was python, not Idle, that had a problem with the tab.]

The stdlib .py files (should all) use the PEP8 standard 4 space indents. Idle comes configured to convert tabs to 4 spaces.

Notepad++ does not. Settings -> Language Menu/Tab Settings lets one set a default tab handling setting and langauge-specific tab settings. Python should be configured for tabsize 4 and [X] replace tab with space. Unless, of course, one uses tabs. But then one should either not edit stdlib files or make sure to switch every time one edits one. I have had settings disappear after upgrading (ugh).

Similar comments apply to other code editors.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to