Error correction issues

Thy -  
Felice_ Posted messages 271 Status Membre -
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 réponses

Felice_ Posted messages 271 Status Membre 11
 
Are you writing in console mode?

What is the error message?

To exit Python mode, you press Control + Shift + D ;-)
0
Thyours Posted messages 11 Status Membre
 
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
Felice_ Posted messages 271 Status Membre 11 > Thyours Posted messages 11 Status Membre
 
But 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
Thyours Posted messages 11 Status Membre > Felice_ Posted messages 271 Status Membre
 
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
Felice_ Posted messages 271 Status Membre 11 > Thyours Posted messages 11 Status Membre
 
But do you write your lines of code in a .py file or in the console (terminal, shell ...)?
0
Thyours Posted messages 11 Status Membre > Felice_ Posted messages 271 Status Membre
 
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
Felice_ Posted messages 271 Status Membre 11
 
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
Thyours Posted messages 11 Status Membre
 
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
Felice_ Posted messages 271 Status Membre 11
 
I have a hard time following you, no mistake, but no window opens with "Hello" written on it?
0
Thyours Posted messages 11 Status Membre
 
That's exactly it. Absolutely nothing is happening.
0
Felice_ Posted messages 271 Status Membre 11
 
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