Application for windows and mac using python - python

I'm in a dilemma. I've got a python code that works for each of the yellow squares shown below but I want to make an application that looks like below and uses the information from the first text box and the second drag and drop box. Then depending on what the user clicked on, the code for that would run. I'm not sure how to approach this. Any help would be greatly appreciated!

You can use Python GUI libraries like:
Tkinter
PyQT
WxPython
Kivy
Pyglet
(This list is not exhaustive.)
Each has their own advantages and disadvantages. Choose the one that fits your project the best.
My personal recommendation for your particular project would be Kivy.

Related

Visual programming in python

In raspberry pi using Python is there any way to make a program where according to the place you click on a designed screen actions can be taken and output given accordingly.
I am using the raspbian-jessie os and have a 7 inch touch screen, I want to create buttons on the screen. When I click on a button it should execute a program.
you probably put the wrong tag, there is nothing to do with functional-programming or graphics, and still little relations with whether you are in raspberry pi or something else
you mean you are in linux and got a touch screen, and want to add some indicator on your touch? what desktop are your using, or something to do with the hardware.?
please state your question clear! and don't let me guess your expection
Look into Kivy or Qt. These are the most popular GUI interfaces for Python.

How to add user-resizable images in a textbox for Python GUI

I'm trying to make a word processor type program in python. I'd like the user to be able to open a resizable image into the text area like in MS Word. I've looked into wxpython and tkinter. My understanding is that wxpython doesn't have a feature for images inside textboxes, and I'm not sure if tkinter has a way of letting the user resize the image. Is there a way for me to add this feature using one of the popular GUI toolkits?
Use PyQt. You can achieve lot of things through the highly capable library offered by them.
Another option is to use PyGTK.
Both toolkit also offer GUI building tools for ease of creation.

making a python gui for ffdshow

I was thinking that for a learning project for myself, I would try to make a GUI for ffdshow on linux, using tkinter. Wanted to make sure this project would be feasible first, before I get halfway through and run into something that cant be done in python.
Basic idea is to have a single GUI window with a bunch of drop down boxes that have the various presets (like format or bitrate), as well as a text box where a custom number can be entered if applicable. Then when all the options are selected, the user hits the Start button on the GUI and it shows a progress little bar with a percentage. All the options selected would just send the relevant selections as cli arguments for ffdshow, and begin the conversion progress (essentially turning all the user's input into a single perfect cli command).
Is all this doable with python and tkinter? and is it something that a relative newb with only very basic tkinter experience could pull off with books and other python resources?
Thanks
That is precisely the type of thing that python and Tkinter excel at. And yes, a relative newbie can easily do a task like that.

Using Python to manipulate the GUI's of other programs?

I have a program here that has an entry box and a button.
I want python to enter a string into the entry box, then press the button. What is the best way of going about this?
This is for windows 7, BTW.
pyWinAuto will work nicely for this. With it you can "type" text into windows based on window title( or window class) as well as "click" buttons. Its fairly easy to use, and the website is pretty good about giving you examples on how to do what you want.
http://pywinauto.openqa.org/howto.html
I've heard of, but not yet tried myself:
WATSUP
Python Win32 GUI Automation, aka "pywinauto"
PyAutoGUI (installable through pip) can automate mouse/keyboard and works on Mac/Windows/Linux.
It also has some basic screenshot image recognition capabilities like Sikuli has.
https://pypi.python.org/pypi/PyAutoGUI

Something like Explorer's icon grid view in a Python GUI

I am making a Python gui project that needs to duplicate the look of a Windows gui environment (ie Explorer). I have my own custom icons to draw but they should be selectable by the same methods as usual; click, ctrl-click, drag box etc. Are any of the gui toolkits going to help with this or will I have to implement it all myself. If there aren't any tools to help with this advice would be greatly appreciated.
edit I am not trying to recreate explorer, that would be madness. I simply want to be able to take icons and lay them out in a scrollable window. Any number of them may be selected at once. It would be great if there was something that could select/deselect them in the same (appearing at least) way that Windows does. Then all I would need is a list of all the selected icons.
Python has extensions for accessing the Win32 API, but good luck trying to re-write explorer in that by yourself. Your best bet is to use a toolkit like Qt, but you'll still have to write the vast majority of the application from scratch.
Is there any way you can re-use explorer itself in your project?
Updated for edited question:
GTK+ has an icon grid widget that you could use. See a reference for PyGTK+: gtk.IconView
In wxPython there's a plethora of ready-made list and tree controls (CustomTreeCtrl, TreeListCtrl, and others), a mixture of which you can use to create a simple explorer in minutes. The wxPython demo even has a few relevant examples (see the demo of MVCTree).
I'll assume you're serious and suggest that you check out the many wonderful GUI libraries available for Python.

Categories