#!/usr/bin/python """ Takes a long url in and returns a shortened url as a string, based on your configured shortening service """ url = "http://www.gwibber.com/this/path/isnt/here" import gwibber.lib gw = gwibber.lib.GwibberPublic() short_url = gw.Shorten(url) print short_url