Problème python

Fermé
SPH - Modifié le 28 avril 2022 à 17:34
yg_be Messages postés 23526 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 14 avril 2025 - 28 avril 2022 à 17:22
Bonjour,

je suis en train d'apprendre le language python et j'ai un problème le .delete et le .insert ne marchent dans mon script, voici mon code:

from tkinter import *
import string
from random import randint, choice

window = Tk()
window.title("Générateur de mot de passe")
window.geometry("720x480")
window.config(background="purple")


frame = Frame(window, bg="purple").pack(expand=YES)

right_frame = Frame(frame, bg="purple").pack()

width = 300
height = 300
image = PhotoImage(file="user-data.png").zoom(18).subsample(50)
canvas = Canvas(frame, width=width, height=height, bg='purple', bd=0, highlightthickness=0)
canvas.create_image(width / 2, height / 2, image=image)
canvas.pack(side=LEFT)

label_title = Label(right_frame, text="Mot de passe", font=("Helvetica", 30), bg='purple', fg="black").pack(side=TOP)

password_entry = Entry(right_frame, font=("Helvetica", 20), bg="purple", fg="black").pack(fill=X)

Button(right_frame, text='Générer', font=("Helvetica", 20), fg="black", bg="purple").pack(fill=X)


window.mainloop()
A voir également:

1 réponse

yg_be Messages postés 23526 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 14 avril 2025 Ambassadeur 1 577
28 avril 2022 à 17:22
bonjour,
il est nécessaire, quand tu postes du code, d'utiliser les balises de code: https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code

as-tu un message d'erreur? à quelle ligne?
0