Re: [BangPypers] Redirection of standard output to a variable

2008-05-11 Thread KartheeK
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 <[EMAIL PROTECTE

Re: [BangPypers] Redirection of standard output to a variable

2008-05-11 Thread S.Ramaswamy
> > I am trying to find a way from which I could redirect standard output to a > variable. You can redirect stdout and stderr to a file. Check out the following section from Dive into Python, that has sample code: http://www.diveintopython.org/scripts_and_streams/stdin_stdout_stderr.html Ramaswa

Re: [BangPypers] Redirection of standard output to a variable

2008-05-11 Thread Rishabh Manocha
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:2

[BangPypers] Redirection of standard output to a variable

2008-05-11 Thread KartheeK
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 t