[Tutor] How to read remote text file?
alan.gauld at btinternet.com
Tue Mar 29 10:26:44 CEST 2011
"Ratna Banjara" <mast.ratna at gmail.com> wrote
> I need to read text file from remote server and generate excel file
> local computer using python. Is it possible? If so how?
Which bit is hard?
The reading the file remotely? Or the generating Excel?
If the file system is mounted on your local computer you can read it
any other file via the mount. If not you will need to fetch a copy for
which the server will need to provide some form of access
mechanism - ftp, http, ssh or whatever.
To convert the file to Excel will depend on what the original format
and how complex the output is. There are various support modules
to help starting with the CSV module and ranging up to more Excel
specific variants. Finally you can create/edit Excel documents
directly via COM if you are on a Windows box with Excel installed...
But that is not for the faint hearted!
Author of the Learn to Program web site
More information about the Tutor