codecraig> stefan: i added, "return 1" to my sendFile method on the
server...took
codecraig> care of the error, thanks.
Yes, by default XML-RPC doesn't support objects like Python's None. As the
error message indicated you have to enable allow_none to permit transmission
of None.
Skip
stefan: i added, "return 1" to my sendFile method on the server...took
care of the error, thanks.
f. petitjean: i cleaned up my code by closing the file, however, when i
tried your exact code above...i got stuck an infinite loop and my PC
speaker beeped over and over :)
thanks.
--
http://mail.
Le 19 Apr 2005 11:02:47 -0700, codecraig a écrit :
> Experient I have been :)
>
> Here is what I am getting now
>
> CLIENT
> ---
> d = xmlrpclib.Binary(open("C:\\somefile.exe").read())
open the file with mode "rb"
fin = open(r'C:\somefile.exe', 'rb')
contents = fin.read()
fin.close()
codecraig schrieb:
CLIENT
---
d = xmlrpclib.Binary(open("C:\\somefile.exe").read())
server.sendFile(d)
SERVER
--
def sendFile(tmp):
print "FILE:", tmp
This returns None. Don't know what XML-RPC expects, but you may either try
to return something else from the function or ma
Experient I have been :)
Here is what I am getting now
CLIENT
---
d = xmlrpclib.Binary(open("C:\\somefile.exe").read())
server.sendFile(d)
SERVER
--
def sendFile(tmp):
print "FILE:", tmp
The server receives the file, because it prints it out, but on the
client I get
codecraig> how would I decode it?
Assuming you have Python at the other end and you get a Binary object
instead of a string, access its data attribute. OTOH, xmlrpclib may
automatically decode the wrapper object for you.
In any case, I have two further recommendations:
* Check the xmlr
how would I decode it?
--
http://mail.python.org/mailman/listinfo/python-list
codecraig> I thought i read somewhere that by using pickle or something,
codecraig> that u could get a string representation of your object (or a
codecraig> file in my case) and send that. Any ideas?
Sure:
stuff = xmlrpclib.Binary(open(somefile).read())
server.call_some_remo
Hi,
I want to use XML-RPC to send a file from client-to-server or from
server-to-client. I know XML-RPC supports, int, string etc...not
objects.
I thought i read somewhere that by using pickle or something, that u
could get a string representation of your object (or a file in my case)
and sen