Error correction issues
Thy
-
Felice_ Posted messages 271 Status Membre -
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
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
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:
In Python 3, you replace:
With:
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 *
Well, on the console everything is fine, no errors, but nothing happens!
Like many other attempts I've made by the way... pffff... annoying!
Like many other attempts I've made by the way... pffff... annoying!
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.
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...
P.S. Sorry for the informal address.
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?