Advertisement
Guest User

mathbr

a guest
Feb 20th, 2011
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. from __future__ import with_statement
  4. from contextlib import closing
  5. import gio
  6.  
  7. gfile = gio.File("http://ca.isohunt.com/download/271795297/debian.torrent")
  8.  
  9. with closing(gfile.read()) as stream:
  10.     content = stream.read()
  11.  
  12. print 'Torrent content: %s' % content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement