擅长:python、mysql、java
<p>在python 2.x中,整数操作数产生整数除法。试试这个:</p>
<pre><code>#Callback function invoked when download/upload has progress
def progress(download_t, download_d, upload_t, upload_d):
print 'in fileupload progress'
mainwin.mainw.prog_bar.set_fraction(float(upload_d) / upload_t)
</code></pre>