0

I have a script in python that is being processed in cmd. See code:

#!/usr/bin/python
# -*- coding: iso-8859-15 -*-

import glob,sys
import os

def dome(imagee):
    cmd = "gimp-console-2.8 -idfsc --no-interface --no-splash --pdb-compat-mode on --no-shm --batch-interpreter python-fu-eval -b 'import sys,os;sys.path=[\".\"]+sys.path;import processing;processing.prome(\"%s\");' -b 'pdb.gimp_quit(0)'" % imagee
    os.system(cmd)

if __name__ == "__main__":
    a = sys.argv[1]
    dome(a)

Now every time I call it, it generates batch output, something like: Batch command executed succesfully.

and I need to press some key or terminate it in order to exit. What I can do not to show me output of that and not to need to press any key, all I want is simple for script to be executed and that's all.

wearp
  • 153
  • 1
  • 9
truе
  • 95
  • 1
  • 13
  • 2
    You're... using Python to run GIMP to run a Python script... – Ignacio Vazquez-Abrams Sep 20 '14 at 21:38
  • Something like that, yes. @IgnacioVazquez-Abrams – truе Sep 20 '14 at 22:03
  • And what is the command to execute this Python script? Do you run it with `python.exe` or `pythonw.exe`? See [pythonw.exe or python.exe?](http://stackoverflow.com/questions/9705982/) for the difference like `pythonw.exe` not opening a console window. It is completely unclear for me why your Python script contains a shebang in first line as on Windows there is no application with name `python` in a directory `usr\bin` in root of current drive and `cmd.exe` does not support shebang. – Mofi Sep 20 '14 at 22:13
  • I am calling it with python /myScript /myFile . I have set path python to point to python bin folder. Also, when calling pythonw it generates new cmd. – truе Sep 20 '14 at 22:17

0 Answers0