I would like to know how I could execute a command whitout appears the cmd window. My code is in Python and the O.S. is Windows7.
The problematic line is:
os.system(pathandarguments)
The program works fine, execute the given path with the arguments but I loose the control of my program because my program window minimizes, I see cmd window a seconds and then my window program dont maximizes.
I want to execute the string pathandarguments without minimize my principal window. I prefer, if its possible, dont show cmd window. I tried differents ways to make this:
os.system(pathandarguments)
= works fine but minimizes my program window.
os.popen(pathandarguments)
= ERROR: CThread::staticThread : Access violation at 0x77498c19: Writing location 0x00000014
(Don't work)
subprocess.Popen([pathandarguments], shell=False)
= Exception in python script's onAction (Don't work)
Thanks in advance.
EDIT @martineau, The problem is not that I cannot import process, revising the log of my app I saw the problem is with import process at line 146:
13:42:20 T:4116 M:2156859392 NOTICE: import win32api
13:42:20 T:4116 M:2156859392 NOTICE: ImportError
13:42:20 T:4116 M:2156859392 NOTICE: :
13:42:20 T:4116 M:2156859392 NOTICE: No module named win32api
I dont have module win32api.