Looks generally fine. Couple of minor notes:
1) Use PersistentTemporaryFile from calibre.ptemfile rather than the stdlib tempfile module
2) Instead of except: use except Exception: other you catch things like keyboardinterrupts and so on
3) use with rather than try..finally
Yes a separate tab is fine. And yes this is MTP only, the USBMS based kindle driver already handles apnx itself.
|