os.getpriority() and os.setpriority()
Hi all, after having implemented something very similar in psutil: http://code.google.com/p/psutil/issues/detail?id=142 ...I decided to contribute a patch for exposing getpriority() and setpriority() system calls in the os module: http://bugs.python.org/issue10784 This was also raised some time ago: http://mail.python.org/pipermail/python-ideas/2009-April/004028.html ...and it seems feedbacks were positive. I think it would be nice to have Windows equivalents (GetPriorityClass / SetPriorityClass) as well but I'm not sure how since their notation is different. Regards, --- Giampaolo http://code.google.com/p/pyftpdlib http://code.google.com/p/psutil
I think it would be nice to have Windows equivalents (GetPriorityClass / SetPriorityClass) as well but I'm not sure how since their notation is different.
I don't mind exposing it (somewhere), however, it should keep its original name. In addition, you probably need OpenProcess, as well as Get/SetThreadPriority along with it. I think Python should incorporate something like pywin32, to expose all APIs whole-sale, in a type-safe manner (unlike ctypes). Regards, Martin
participants (2)
-
"Martin v. Löwis"
-
Giampaolo Rodolà