[BangPypers] Redirection of standard output to a variable

Rishabh Manocha rmanocha at gmail.com
Mon May 12 08:43:54 CEST 2008


Did you take a look at using urllib[1] or urllib2[2]?? You can use
them to download your file, save it and process any meta (header) info
returned.

[1] - http://docs.python.org/lib/module-urllib.html
[2] - http://docs.python.org/lib/module-urllib2.html

Best,

Rishabh

On Mon, May 12, 2008 at 11:23 AM, KartheeK <kartheekpn at yahoo.co.in> wrote:
> Hi,
>
> I am trying to find a way from which I could redirect standard output to a
> variable.
> The server I am using runs, Python 2.2.1 [subprocess module is not there,
> and my ops team denies for an upgrade]
> I am writing a script that downloads a configuration file from remote
> servers[200+], I want to process the standard output so that I can confirm
> if the download did happen completely/correctly.
> Please pass on any hints..
>
> Thanks,
>
> KartheeK
>
>
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>


More information about the BangPypers mailing list