Ray S wrote: > Is it possible to have an app re-set its own priority, a-la task manager? > > I see that 2.4+ has the ability for sub-processes, but only on creation. > > Apparently > win32process.SetPriorityClass(handle, dwPriorityClass) > and > PyCWinThread.SetThreadPriority(priority) > allows one to change a sub while a the sub is running, but what about the > current?
This should do the trick: win32process.SetPriorityClass( win32process.GetCurrentProcess(), win32process.IDLE_PRIORITY_CLASS ) For a description of the available priority classes, see: http://msdn.microsoft.com/library/en-us/dllproc/base/setpriorityclass.as p Jimmy _______________________________________________ Python-win32 mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-win32