Skip to content

Instantly share code, notes, and snippets.

View cchurch's full-sized avatar
🤖
I'm not a robot.

Chris Church cchurch

🤖
I'm not a robot.
View GitHub Profile
@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
@chrisguitarguy
chrisguitarguy / transport.py
Created April 10, 2012 22:07
Python xmlrpc lib Transport that used Requests
# -*- coding: utf-8 -*-
"""
A replacement transport for Python xmlrpc library.
Usage:
>>> import xmlrpclib
>>> from transport import RequestsTransport
>>> s = xmlrpclib.ServerProxy('http://yoursite.com/xmlrpc', transport=RequestsTransport())
>>> s.demo.sayHello()