Python Forum
[Tkinter] Python - Tkinter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Python - Tkinter
#1
Hi, I'm doing Python with Tkinter.

So, I've a program :

from tkinter import *

root = Tk()

def fonction(event):
    print(event)
        
root.bind('a', fonction)
root.bind('b', fonction)



root.mainloop()

input()
This program take what the users click on his keyboard.

But I've 2 problems :

(I've IDLE Python 3.6 32 bits)

When I click on 'Run Program' in the edition windows, the program run.
But, when I double clic on it, in the folder, the black window open, and shut up. I don't know why and I can't see what is written ...

And is it possible to run it in bottom task ? Like when the users can't see it or just when the users don't click on it. Like, when you are surfing on Internet, and you press "A" and my program start and run an other program ? Because if not, I can use input() ...

Thanks

I'm sorry for the bad english ...
Reply


Messages In This Thread
Python - Tkinter - by Ditrate40 - Dec-06-2018, 05:53 PM
RE: Python - Tkinter - by Larz60+ - Dec-06-2018, 08:26 PM
RE: Python - Tkinter - by Ditrate40 - Dec-07-2018, 01:36 PM
RE: Python - Tkinter - by woooee - Dec-07-2018, 04:38 PM
RE: Python - Tkinter - by nilamo - Dec-07-2018, 04:44 PM
RE: Python - Tkinter - by Ditrate40 - Dec-08-2018, 12:35 PM
RE: Python - Tkinter - by nilamo - Dec-09-2018, 05:27 AM
RE: Python - Tkinter - by Ditrate40 - Dec-09-2018, 11:40 AM
RE: Python - Tkinter - by Ditrate40 - Dec-09-2018, 04:39 PM
RE: Python - Tkinter - by Nick_tkinter - Feb-12-2021, 01:48 PM
RE: Python - Tkinter - by Nick_tkinter - Feb-12-2021, 01:53 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020