Python Forum

Full Version: Open With
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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/tk...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.