<br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> Maybe there is a isolated problem in number chunks value, which should<br>> be round up in order to send the entire file.
<br><br>Yes, could be, I didn't test it completely.</blockquote><div><br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">"""Send a file over the D-Bus Tube"""
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">size = os.path.getsize(filename)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
f = open(filename)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">chunk_size = 1000</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
chunks = size / chunk_size</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">if (size%chunk_size != 0):</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
chunks += 1</span><br> </div></div><br>