Skip to content

Instantly share code, notes, and snippets.


Santiago Espinosa Saigesp

View GitHub Profile
sebdah /
Last active Nov 19, 2020
Running a background thread in Python
import threading
import time
class ThreadingExample(object):
""" Threading example class
The run() method will be started and it will run in the background
until the application exits.
wenbert / Python save image from URL
Created Dec 29, 2010
Python save image from URL
View Python save image from URL
import cStringIO # *much* faster than StringIO
import urllib
import Image
file = urllib.urlopen('')
im = cStringIO.StringIO( # constructs a StringIO holding the image
img ='/home/wenbert/uploaderx_files/test.gif')
except IOError, e:
You can’t perform that action at this time.