Python Forum

Full Version: Windows GUI with push buttons to launch python scripts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Pick a GUI framework and start making a basic window with a button and an event.
hi as i said i have never gone near this, could you recomend any please ?
I could but I would be biased giving you my preference.
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)
(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.
looks dont really matter, its for more of a robust system as the python scripts will be running security system stuff
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.