Error correction issues

Hello,

Hi everyone... as a beginner, I'm facing a serious problem: as soon as I accidentally make a typo and an error message appears, I'm stuck because I can't correct the said error, I can no longer write/delete. Is this normal?
P.S.: I'm just starting out.
Thank you in advance to those who will be kind enough to reply.

Configuration: Windows / Chrome 55.0.2883.87

6 answers

  1. Are you writing in console mode?

    What is the error message?

    To exit Python mode, you press Control + Shift + D ;-)
    0
    1. Thank you very much, I'll test this... console mode? No idea! For error messages, it can be any style, my concern being able to correct them.
      I just tested and it completely closed Python for me!
      For your information, I’m on Windows, Python 2.7.13 if that’s important.
      I also just registered, my username is Thyours... thanks to you.
      0
    2. @ThyoursBut after the error, you're on a new line with ">>>" right?

      It might be more interesting for you to write your code in .py files and then run python, that way you can correct the code in case of an error. Because in console mode, you are forced to rewrite everything without the error this time...
      0
    3. @Felice_Exactly, and it’s at that moment that I can't correct it because I can’t fix the error: if I place the cursor on the line, I can no longer write or delete. I tried to go through edit and then undo, but nothing happens. I also tried going to the line but still the same problem.
      P.S. Sorry for the informal address.
      0
    4. @ThyoursBut do you write your lines of code in a .py file or in the console (terminal, shell ...)?
      0
    5. @Felice_des fichiers.py... if I understand correctly, I type the code in a word processor?
      if that's the case, to make them accessible to python, the code file must be named xxxxx.py, is it enough to just name it that way or do I need to convert it in some way, and if so, how?
      0
  2. tkinter is normally part of the standard libraries of Python. There is therefore nothing to install.

    It is a library for creating graphical user interfaces.

    In Python 2, you can write the following code in your file:
    # -*- coding: utf-8 -*- from Tkinter import * fenetre = Tk() etiquette = Label(fenetre, text = 'Hello') etiquette.pack() fenetre.mainloop()


    In Python 3, you replace:
    from Tkinter import *


    With:
    from tkinter import *
    0
    1. Well, on the console everything is fine, no errors, but nothing happens!
      Like many other attempts I've made by the way... pffff... annoying!
      0
      1. I have a hard time following you, no mistake, but no window opens with "Hello" written on it?
        0
        1. That's exactly it. Absolutely nothing is happening.
          0
          1. The problem is that you are using this Python IDLE which allows you to run your code directly but not a Python file. You need to go through the Windows console.
            0