Skip to content

Instantly share code, notes, and snippets.

@glennzw
glennzw / evil.py
Last active August 19, 2021 13:37
Simple Python library to manage wireless network connection.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# [email protected] / @glennzw
# Handle wireless networking from Python
# The name (evil.py) is a play on 'wicd'
from subprocess import Popen, call, PIPE
import errno
from types import *
import logging
import sys
@liuw
liuw / ctype_async_raise.py
Created April 17, 2012 16:02
Nasty hack to raise exception for other threads
#!/usr/bin/env python
# liuw
# Nasty hack to raise exception for other threads
import ctypes # Calm down, this has become standard library since 2.5
import threading
import time
NULL = 0