Sending a file to a remote server.

Jose Carlos Balderas Alberico josecarlos.balderas at gmail.com
Sun Apr 2 18:37:18 EDT 2006


Hi. I posted a message in the list a couple of days ago about sending a file
to a remote SimpleXMLRPCServer. Well. my doubt still remains, so I come to
you again in search of a clearer answer.

The thing is I want to send a ZIP file to a server, and what I basically do
is enclose the file data into a Binary object by doing something like "data
= Binary(f.read())". Then I call a function in the server, passing the
object as a parameter, and have the server process the same file by doing
something like

f = open("somefile.zip", 'w')
f.write(binaryObject.data)

Since I've never programmed server/client before, I've never faced the fact
of sending a file to a remote machine.

I just want to know if what I've done to send the file is acceptable, and if
you know of a better way to send files to a SimpleXMLRPCServer.

Thank you very much for your attention.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060403/65652d35/attachment.html>


More information about the Python-list mailing list