Skip to content

Instantly share code, notes, and snippets.

👾
Invading

Santiago Espinosa Saigesp

👾
Invading
Block or report user

Report or block Saigesp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wenbert
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
try:
file = urllib.urlopen('http://freegee.sourceforge.net/FG_EN/src/teasers_en/t_gee-power_en.gif')
im = cStringIO.StringIO(file.read()) # constructs a StringIO holding the image
img = Image.open(im)
img.save('/home/wenbert/uploaderx_files/test.gif')
except IOError, e:
@sebdah
sebdah / threading_example.py
Last active Jul 11, 2019
Running a background thread in Python
View threading_example.py
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.
"""
You can’t perform that action at this time.