(src, dest)
| 1450 | |
| 1451 | |
| 1452 | def copychunked(src, dest): |
| 1453 | chunksize = 524288 class="cm"># half a meg of bytes |
| 1454 | fsrc = src.open(class="st">"rb") |
| 1455 | try: |
| 1456 | fdest = dest.open(class="st">"wb") |
| 1457 | try: |
| 1458 | while 1: |
| 1459 | buf = fsrc.read(chunksize) |
| 1460 | if not buf: |
| 1461 | break |
| 1462 | fdest.write(buf) |
| 1463 | finally: |
| 1464 | fdest.close() |
| 1465 | finally: |
| 1466 | fsrc.close() |
| 1467 | |
| 1468 | |
| 1469 | def isimportable(name): |