file transfer in python
bieffe62 at gmail.com
Fri Jun 26 08:07:54 EDT 2009
On 26 Giu, 13:38, jayesh bhardwaj <bhardwajjay... at gmail.com> wrote:
> i am trying to find something useful in python to transfer html files
> from one terminal to other. Can this be done with some module or shall
> i start coding my own module using low level socket interface. If u
> know about some books on this topic or any online help then plz help.
In the standard library there is ftplib, which allows your program to
act as a FTP client. Of course
the receiver end should have an FTP server installing and running. I
don't tink it can handle SFTP protocol, so
if you are concerned with security you should opt for someting else,
or protect your connection somehow (e.g. SSH tunneling).
Or, if you have ssh (client and server) installed, you could simply
spawn a subprocess ( see the subprocess module for that ) which
execute one or more 'scp' commands.
More information about the Python-list