Skip to content

Instantly share code, notes, and snippets.

View Steven-Wilson's full-sized avatar

Steven Wilson Steven-Wilson

  • Rhumbix
  • Florida
View GitHub Profile
@Steven-Wilson
Steven-Wilson / sdl2window.py
Created May 18, 2017 12:17
making a topmost window in sdl2 on windows with python
import sdl2
import ctypes
def main():
window = sdl2.SDL_CreateWindow('test'.encode('utf-8'),
sdl2.SDL_WINDOWPOS_UNDEFINED,
sdl2.SDL_WINDOWPOS_UNDEFINED,
800, 600,
@Steven-Wilson
Steven-Wilson / args_deco.py
Created September 1, 2016 16:07
Simplifies creation of decorators that have arguments
def args_deco(deco):
''' Simplifies creation of decorators that have arguments.
Example Usage:
from functools import wraps
@args_deco
def logged(fn, enabled=False, label="NOTE: "):
if enabled: