[Tutor] how can I compare a local directory or file with a remoteone
Alan Gauld
alan.gauld at btinternet.com
Wed Jun 20 21:41:02 CEST 2007
"Richard Querin" <rfquerin at gmail.com> wrote
> I was initially thinking that I would maybe use the linux diff
> command
> in conjunction with the wget command (or something similar) to
> create
> a local copy but that involves downloading files. Is there any way
> in
> python to do a similar thing but without having to download a copy
> of
> the remote files/directories?
Nt unless you can mount the remote filesystem as if it were local,
but even then puython is still going to need access to the file
contents to do a diff, the only difference is it wouldn't store them
on a disk. But you can read the file into memory from a remote
server so thats not really much advantage. Whatever you do you
somehow have to get the contents over the network.
You might find that comparing the files checksums is sufficient.
Alan G.
More information about the Tutor
mailing list