This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE 2.713 on debian 9.6 over WSL W10 IdentationError
Type: behavior Stage: resolved
Components: IDLE Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: audricd, terry.reedy
Priority: normal Keywords:

Created on 2019-01-24 11:04 by audricd, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py27debian9wslw10indentationerror.PNG audricd, 2019-01-24 11:04 screenshot of the issue. Working on native W10 and non working on Debian 9 WSL
Messages (2)
msg334293 - (view) Author: Audric (audricd) Date: 2019-01-24 11:04
Hello,

The screenshot attached is a clear repro.

Environment:
Surface Pro 3 Win 10 1803 Python 2.7.14
WSL Debian 9.6 with Python 2.7.13

Code:
>>elements = []
>>for i in range(0, 6):
>>...elements.append(i)

-------------------------------

Working:
>>print elements
>>[0, 1, 2, 3, 4, 5]

Non working:
  File "<stdin>", line 2
    elements.append(i)
           ^
IndentationError: expected an indented block
msg334312 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-01-24 18:00
In the Debian screenshot with the traceback, you run interactive Python, not IDLE, in the system terminal, with the command-line entry 'python'.  Notice the secondary ... prompt.

The bug in the code you entered is indicated by the error message.  In interactive Python you have to indent the bodies of compound statements yourself.  (IDLE does this for you with its 'smart indent' feature.)  In the future, please ask questions about exception messages (and Python in general) on python-list or elsewhere.  Perhaps you should also reread the Python Tutorial.
History
Date User Action Args
2022-04-11 14:59:10adminsetgithub: 79998
2019-01-24 18:00:42terry.reedysetstatus: open -> closed
resolution: not a bug
messages: + msg334312

stage: resolved
2019-01-24 11:04:12audricdcreate