Python Forum
Open With - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Open With (/thread-11404.html)



Open With - Dracian_123457 - Jul-07-2018

I am making a program that converts files from one format to another. In order to use it, I would like to be able to make it so that I can open the file easily. Currently I change the file directory in the source code, but I would like to be able to just right-click on the file, and open it with the python program. Is there some sort of place holder for the filename I can use?


RE: Open With - Larz60+ - Jul-07-2018

not quite just a place holder, but a GUI with buttons, of which there are many to choose from (tkinter is built into python, but is lightweight).
http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html

If strictly fixed location text based, You could probably also do it with cursors ( https://docs.python.org/3/howto/curses.html ) by creating a mouse event and activating a second event is mouse x, y position was within rectangle of filename.


RE: Open With - buran - Jul-07-2018

check this thread https://python-forum.io/showthread.php?tid=11320
my post #5