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
| from behave.matchers import register_type | |
| def parse_optional(text): | |
| return text.strip() | |
| # https://pypi.python.org/pypi/parse#custom-type-conversions | |
| parse_optional.pattern = r'\s?\w*\s?' | |
| register_type(optional=parse_optional) |
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, time | |
| SendInput = ctypes.windll.user32.SendInput | |
| # C struct redefinitions | |
| PUL = ctypes.POINTER(ctypes.c_ulong) | |
| class KeyBdInput(ctypes.Structure): | |
| _fields_ = [("wVk", ctypes.c_ushort), | |
| ("wScan", ctypes.c_ushort), | |
| ("dwFlags", ctypes.c_ulong), |