Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converting python plugin-in shellout.py from gimp 2.x to 3.x
#68
(06-15-2026, 11:45 AM)migf1 Wrote: Here's a version with better error-handling and more comments, but less tested than the previous one.

You're my hero!  This is why I read this thread (already some time ago), as I'm mostly using ShellOut for other programs (Topaz, StarNet, DeepSNR...).  I tried to 'revert' the NIK-only script to also use other programs, but failed miserably  Sick  So thousand thanks for making it available.  Maybe you should post a separate thread for this, so it is easier to find for those that are in a similar situation?

That said, I tried your script - and it wouldn't work!  It opened the requested program, but didn't pass the image to it.

After some trial-and-error I could track it down to the call

Code:
child = subprocess.Popen(args, shell=True)

Without shell=True it does work.  I found a Note in the docs

Quote:Changed in version 3.12: Changed Windows shell search order for shell=True. The current directory and %PATH% are replaced with %COMSPEC% and %SystemRoot%\System32\cmd.exe. As a result, dropping a malicious program named cmd.exe into a current directory no longer works.
Not sure if that is related, as I am on Linux (Python 3.13.13).  But maybe it's some upstream Bug in the context of this change...
Reply


Messages In This Thread
RE: Converting python plugin-in shellout.py from gimp 2.x to 3.x - by DerPit - 06-23-2026, 09:36 AM

Forum Jump: