This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys, time, threading, abc | |
from optparse import OptionParser | |
def parse_options(): | |
parser = OptionParser() | |
parser.add_option("-t", action="store", type="int", dest="threadNum", default=1, | |
help="thread count [1]") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A very simple script to change a process' priority in native python 3.# | |
Works on Windows only (for now) | |
Todo: | |
Make it less hacky, more portable (should extract values from the api and use them instead of the hardcoded ones) | |
Add documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
import ctypes.wintypes | |
class Constants(object): | |
"Container for constants found in win32 headers" | |
WS_OVERLAPPED = 0x00000000L | |
WS_POPUP = 0x80000000L | |
WS_CHILD = 0x40000000L | |
WS_MINIMIZE = 0x20000000L | |
WS_VISIBLE = 0x10000000L |
NewerOlder