Configured emacs as an IDE for Python. In the end, everything works, everything is fine, except for one "BUT". If I use the input command in a Python program and run my code, I get an error. Here is a sample program:
print ('Hello, World !!!')
name = input ('Say me your name, please:')
print (f'Hello, {name} !!! ')
It gives the following error:
Hello, World!!! Say me your name, please:Traceback (most recent call last): File "<stdin>", line 2, in <module> EOFError: EOF when reading a line
If I write instead of the second line:
name = 'Sergey'
then everything works fine.
Here is a piece of .emacs that deals with working with Python:
;; Cc e will be used to run in Python mode.
(defun eval-python-buffer ()
"Execute current buffer as Python code."
(interactive)
(shell-command-on-region 1 (point-max) "/ ​​usr / local / bin / python3"))
(global-set-key (kbd "Cc e") 'eval-python-buffer)
In the usual console, of course, everything works and for this you need to run the program separately from emacs. But I want to somehow "normal". How to make input fully work? I know lisp so far very badly, for the time being I have not even studied it properly, this piece of code is distributed from somewhere on the Internet. Thanks in advance to all those who responded to this question!