View Single Post
Old 05-19-2024, 02:32 PM   #6
tomsem
Grand Sorcerer
tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.
 
Posts: 6,959
Karma: 27060153
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
Thanks for resurrecting this thread.

In addition to being busy and distracted with a lot of other things, I had been stuck just getting python code to copy things off of Scribe, given that it changed to use MTP protocol.

There is a PyMTP package, but it has not been updated for Python 3, it didn't work out of the box and I just left it at that.

But it turns out that updating turned out to be trivial: convert with 2to3, and change 2 other lines of code, and the example code (also 2to3'ed) all works!

It's just a single python file with only standard library calls so as long as it is able to find the libmtp C library on the system, I think it can just be dropped in and used without pip installing anything.

I am planning to check it against latest libmtp C library to see if there are any filetypes or error codes to add (probably not), add type hinting to the code, convert byte strings to str, and it should be good to go for general use.

Last edited by tomsem; 05-19-2024 at 02:48 PM.
tomsem is offline   Reply With Quote