[python-win32] activate an opened window through the server

Tim Roberts timr at probo.com
Fri Apr 24 18:19:10 CEST 2009


belaqziz salwa wrote:
> I used subprocess.call but I had the following message:
>
> Could not import process : (-2147217405, 'OLE error 0x80041003', None,
> None)
>        
> ** I added this code to my process:
>
> cmd = 'idlde.exe -minimized -nodemowarn -noconfirmexit -nosplash
> @C:\SAMIR\soil.run'
> retval = subprocess.call(cmd, 0, None, None)
>

That looks like almost the right code, but 80041003 is
"WBEM_E_ACCESS_DENIED".  If "idlde.exe" is a GUI app that opens a
window, it may be that there is simply no way to do this from a CGI process.

I said "almost" because you have a backslash problem there.  You either
need to double the backslashes:
    cmd = 'idlede.exe ... -nosplash @C:\\SAMIR\\soil.run'
or use the "r" syntax:
    cmd = r'idlede.exe ... @C:\SAMIR\soil.run'

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list