Accessing a USB Device?

Stephen Horne $$$$$$$$$$$$$$$$$ at $$$$$$$$$$$$$$$$$$$$.co.uk
Sun Oct 12 00:49:58 EDT 2003


On 11 Oct 2003 21:20:08 -0700, faizan at jaredweb.com (Fazer) wrote:

>Hello,
>
>I have a MP3 and I want to access the songs in them.  I was wondering
>if Python could help me do that.  I understand that this can be done
>using Linux by mountig it as a file system, but I am not on Linux and
>this is mainly for a Windows platform.  Can anyone shed some light?
>
>Thanks,

Assuming it is a USB device, if the included drivers do not allow
mounting it as a filesystem (my own MP3 player does not, but flash
readers seem to do this as standard) you probably have an extreme
uphill battle accessing it from Python.

Basically, while USB is a serial bus, it isn't like the old serial
ports. It isn't something that's easily handled in a high level
language. If you want to access a USB MP3 device from Python, you will
need...

1.  A good understanding of how USB works at a low level.

2.  Documentation of the probably proprietary protocol that the MP3
    player uses.

3.  A driver development kit and C compiler.

Basically, you'd probably need to write an alternate driver for your
device (which would probably block out the original one) and a Python
extension which communicates with that driver.


-- 
Steve Horne

steve at ninereeds dot fsnet dot co dot uk




More information about the Python-list mailing list