I am new to programming and new to python. I just developed my first script, it will exist a file, but at the moment only from the command line.
This is just a hobby for me, so my work does not depend on it :-)
I spent a few days trying to figure out the development of python gui and came to the conclusion that I should be stupid.
I looked at wxpython and Tkinter and don't understand a single one, although Tkinter seems to be the easier of the two. I even looked at wysiwyg tools like Boa Contrictor and wxglade. I donβt even understand how to use them. I would rather just use my editor and code anyway.
My problem is this:
I would like to create a desktop window with 1 or two objects, depending on what works best. If there is only one object, then a text field of some type, if 2 objects, then a text field and an image.
I want to be able to drag and drop a file from the file manager and drop it in the script window, this is just passing the file names to my script.
I, than I want to redirect stdout to an object in my working window, so that all script output is displayed in the desktop window.
I'm not sure if one object can do something or not. If this is possible than just a text field, just drop the files onto the image and redirect the output to the text field.
I found drag and drop examples on the Internet, but nothing that included stdout redirection, and I could not successfully modify any of the examples I came across.
If any sole has time to demonstrate how to achieve what I want and explain how I would appreciate its work with dignity!
---- EDIT ----
I play with two examples and managed to put hash 2 together to get what I wanted to work. The code is below. It is not cleared yet (old comments, etc.), but it works.
#!/usr/bin/python
Examples: python drag explorer files into tkinter input widget
As well as an example provided courtesy of Noelkd.
For this code to work, you must create a wrapper from the first example. Also, at present, the code simply displays the dragged file in the window, however, the in-place variable must be passed to the script that passes the gui interface.