Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open With
#1
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?
Reply
#2
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.
Reply
#3
check this thread https://python-forum.io/showthread.php?tid=11320
my post #5
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020