Subject: Re: bug#28051: 25.2; Multiline Statement Indentation Error in Inferior Python Mode

From: [email-masked]
Date: Sat, 19 Aug 2017 10:45:13 -0400

[email-masked] writes:

> leads to IndentationError once I try to enter multi-line statements in
> the Inferior python mode. 
>
> Steps:
>
> 1. Start Emacs
> 2. M-x run-python
> 3. try to enter something simple like
>
>    for x in range(10):<RET>
>    <TAB>print x<RET>
>
> 4. The following error occurs:
>
> File "<stdin>", line 1
>     print x
>     ^
> IndentationError: unexpected indent

Does it help if you install pyreadline?  From comments in python.el:

    ;; If your
    ;; Python installation lacks readline (like CPython for Windows),
    ;; installing pyreadline (URL `http://ipython.org/pyreadline.html')
    ;; should suffice.  To troubleshoot why you are not getting any
    ;; completions, you can try the following in your Python shell:

    ;; >>> import readline, rlcompleter

    ;; If you see an error, then you need to either install pyreadline or
    ;; setup custom code that avoids that dependency.