[sugar] files over tubes
Erik Blankinship
erikb
Fri Oct 12 09:11:14 EDT 2007
> > Maybe there is a isolated problem in number chunks value, which should
> > be round up in order to send the entire file.
>
> Yes, could be, I didn't test it completely.
"""Send a file over the D-Bus Tube"""
size = os.path.getsize(filename)
f = open(filename)
chunk_size = 1000
chunks = size / chunk_size
if (size%chunk_size != 0):
chunks += 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/sugar/attachments/20071012/427ec5a7/attachment.htm
More information about the Sugar-devel
mailing list