Re: Looking for Pythonic Examples
- From: "Ido Yehieli" <Ido.Yehieli@xxxxxxxxx>
- Date: 28 Feb 2006 11:55:07 -0800
This one is from our very own BDFL, behold- wget implemented in 7 lines
of python code:
import sys, urllib
def reporthook(*a): print a
for url in sys.argv[1:]:
i = url.rfind('/')
file = url[i+1:]
print url, "->", file
urllib.urlretrieve(url, file, reporthook)
.
- References:
- Looking for Pythonic Examples
- From: G . Völkl
- Looking for Pythonic Examples
- Prev by Date: Re: Threading - will threads run in parallel?
- Next by Date: Re: Threading - will threads run in parallel?
- Previous by thread: Looking for Pythonic Examples
- Next by thread: Re: Looking for Pythonic Examples
- Index(es):
Relevant Pages
|