Package Ganga :: Package Utility :: Package AMGAServerTools :: Module winprocess
[hide private]
[frames] | no frames]

Module winprocess

source code


Windows Process Control

winprocess.run launches a child process and returns the exit code.
Optionally, it can:
  redirect stdin, stdout & stderr to files
  run the command as another user
  limit the process's running time
  control the process window (location, size, window state, desktop)
Works on Windows NT, 2000 & XP. Requires Mark Hammond's win32
extensions.

This code is free for any purpose, with no warranty of any kind.
-- John B. Dell'Aquila <jbd@alum.mit.edu>

Classes [hide private]
  Process
A Windows process.
Functions [hide private]
 
logonUser(loginString)
Login as specified user and return handle.
source code
 
run(cmd, mSec=None, stdin=None, stdout=None, stderr=None, **kw)
Run cmd as a child process and return exit code.
source code
Function Details [hide private]

logonUser(loginString)

source code 

    Login as specified user and return handle.
    loginString:  'Domain
User
Password'; for local
        login use . or empty string as domain
        e.g. '.
administrator
secret_password'
    

run(cmd, mSec=None, stdin=None, stdout=None, stderr=None, **kw)

source code 

Run cmd as a child process and return exit code.
mSec:  terminate cmd after specified number of milliseconds
stdin, stdout, stderr:
       file objects for child I/O (use hStdin etc. to attach
       handles instead of files); default is caller's stdin,
       stdout & stderr;
kw:    see Process.__init__ for more keyword options