[BangPypers] Redirection of standard output to a variable

KartheeK kartheekpn at yahoo.co.in
Mon May 12 08:55:12 CEST 2008


Hi Rishabh,

Unfortunately the remote servers that house these config files do not have them on either www or ftp, my only mode of access is scp
This was a good learning for me , i did not know that something like urllib existed..

Thanks for the inputs

KartheeK

Rishabh Manocha <rmanocha at gmail.com> wrote: 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  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
>
>
_______________________________________________
BangPypers mailing list
BangPypers at python.org
http://mail.python.org/mailman/listinfo/bangpypers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20080512/ba082d1c/attachment.htm>


More information about the BangPypers mailing list