Python Forum
Windows GUI with push buttons to launch python scripts
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windows GUI with push buttons to launch python scripts
#1
Hi, i have a project which works well but consists or a differnt script for what i want it to do. so i want to create a windows GUI so when a user presses the button (labelled whatever it should be) it launches the python script i direct the button to. its that simple at the moment but i have never tried to do this before so looking for advise if anyone can point me in the right direction ?

thanks
Reply
#2
Pick a GUI framework and start making a basic window with a button and an event.
Reply
#3
hi as i said i have never gone near this, could you recomend any please ?
Reply
#4
I could but I would be biased giving you my preference.
Reply
#5
What GUI are you looking for? Does it have to be good looking? Does it all the bells and whistles? What operating system it will be running on? Mobile or desktop? Gaming or graphical?

I would try a few to be honest.
https://wiki.python.org/moin/GuiProgramming

I would say the top ones are for graphical...
tkinter (only because it comes with pytohn)
wxpython
PyQt
Kivy (for mobile)
Recommended Tutorials:
Reply
#6
(Jul-16-2019, 12:01 AM)metulburr Wrote: What GUI are you looking for? Does it have to be good looking? Does it all the bells and whistles? What operating system it will be running on? Mobile or desktop? Gaming or graphical?

I would try a few to be honest.
https://wiki.python.org/moin/GuiProgramming

I would say the top ones are for graphical...
tkinter (only because it comes with pytohn)
wxpython
PyQt
Kivy (for mobile)

I need help with this as well specifically for tkinter.
Reply
#7
looks dont really matter, its for more of a robust system as the python scripts will be running security system stuff
Reply
#8
As stated in the other similar thread

(Jul-17-2019, 05:16 AM)Yoriz Wrote: Try to do the following.
  1. Create a Frame and a mainloop, test it works.
  2. Add a button to the frame, test it works.
  3. Add an event to the button, begin with a print to test it works.
  4. Add the call to the separate python script to the buttons event (depends what the script does how you go about this).

Give this a go, when you get stuck, please post a minimal code sample (in python code tags) for the specific part your stuck on, explain what you expect to happen and what is actually happening and any errors received in error tags.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  tkinter - touchscreen, push the button like click the mouse John64 5 746 Jan-06-2024, 03:45 PM
Last Post: deanhystad
  Centering and adding a push button to a grid window, TKinter Edward_ 15 4,395 May-25-2023, 07:37 PM
Last Post: deanhystad
  [PyQt] Push Button issue gvin47 8 4,263 Apr-18-2020, 05:39 PM
Last Post: deanhystad
  Nesting menu buttons tkinter for python Mocap 1 2,696 Jul-18-2019, 11:46 AM
Last Post: metulburr
  Using tkinter on Windows to launch python 3 scripts Mocap 1 2,686 Jul-17-2019, 05:16 AM
Last Post: Yoriz
  Text after push button chano 13 5,241 Jul-05-2019, 03:10 PM
Last Post: Yoriz
  Huge code problems (buttons(PyQt5),PyQt5 Threads, Windows etc) ZenWoR 0 2,785 Apr-06-2019, 11:15 PM
Last Post: ZenWoR
  [PyQt] Close program using Push Button with the help of input from a Message Box bhargavbn 2 6,612 Oct-30-2018, 05:09 AM
Last Post: bhargavbn
  Launch pdf and close on delete window event ashtona 6 5,575 Mar-22-2018, 03:04 PM
Last Post: ashtona
  [Tkinter] Aligning Python Tkinter Buttons In Rows TollyThaWally 3 7,974 Feb-22-2018, 02:56 AM
Last Post: woooee

Forum Jump:

User Panel Messages

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