Dennis Lee Bieber wrote:
On Mon, 27 Jul 2009 13:38:25 -0700 (PDT), erikcw
declaimed the following in
gmane.comp.python.general:
Something like the Python equivalent of curl http://url.com/file.xml |
head -c 2048
Presuming that | is a shell pipe operation, then doesn't that
command lin
En Mon, 27 Jul 2009 19:40:25 -0300, John Yeung
escribió:
On Jul 27, 4:38 pm, erikcw wrote:
I'm trying to figure out how to download just the first few lines of a
large (50mb) text file form a server to save bandwidth. Can Python do
this?
Something like the Python equivalent of curlhttp://ur
On Jul 27, 4:38 pm, erikcw wrote:
> I'm trying to figure out how to download just the first few lines of a
> large (50mb) text file form a server to save bandwidth. Can Python do
> this?
>
> Something like the Python equivalent of curlhttp://url.com/file.xml|
> head -c 2048
urllib.urlopen gives
erikcw wrote:
> ...download just the first few lines of a large (50mb) text file form a
> server to save bandwidth. Something like the Python equivalent of curl
> http://url.com/file.xml | head -c 2048
If you're OK calling curl and head from within python:
from subprocess import Popen, PIPE
u
I'm trying to figure out how to download just the first few lines of a
large (50mb) text file form a server to save bandwidth. Can Python do
this?
Something like the Python equivalent of curl http://url.com/file.xml |
head -c 2048
Thanks!
Erik
--
http://mail.python.org/mailman/listinfo/python-l