Python file support from -- Command -- option on toolbar

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

xnlover
Posts: 6
Joined: Thu Jan 25, 2024 4:34 am

Python file support from -- Command -- option on toolbar

Post by xnlover »

Is it possible for you to add support for python scripts directly in the "current working directory" without compiling the python scripts into an executable?

What I mean with that when I right click on the toolbar -> customize toolbar -> add "-- Command -- " it supports bat,exe,xbs files.However if we force it to select "(*)" we can add python scripts to the toolbar as well. However,I think it is not able to associate the python script "*.py" file with python.exe or whatever the python file is associated with systemwide. So let's say we have python installed and it is in the windows path and it is associated with *.py files or *.pyw files associated with pyw.exe (windowless mode) and XnviewMp supports these files to be launched in the selected folder directly.

This shall turn the software into a powerhouse if not already.
I hope,it can be doable or if there is already a way to do it that I am missing,I just don't know. There is a workaround to call the python scripts with bat files or compiling them but not directly supported as I see it.

In short,please add *.py and *.pyw support for customizing the "-- Command --" if it is possible.
Also if it is possible,I am not sure how the script can be made to be run for "selected files only" if there is a selection,or if no selection run for all files in the folder. I mean not sure about if the script shall handle it by the code in it ,or XnviewMp shall give the files as an argument to the script so "selection only" mode can be used that way...