Accessing a USB Device?

Josef Meile jmeile at hotmail.com
Wed Oct 15 14:23:50 EDT 2003


> > 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?
> I think it's configured just like a serial port. If I'm right try
pyserial.

I'm also interested, but instead of an MP3 device, I want to connect two
PCs. The problem is that one of the PCs has only a serial port, which must
be
used by another application. However, it has lots of USB ports, so I could
use
either one USB adapter to RS-232 or a USB to USB cable. As suggested in a
message from this newsgroup, I tried COM3, which was supposed to be the usb
port, but it fails, it shows:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Python23\Lib\site-packages\serial\serialwin32.py", line 70, in
__init__
    raise serialutil.SerialException, "could not open port: %s" %
    msg serial.serialutil.SerialException: could not open port:
    (2, 'CreateFile', 'The system cannot find the file specified.')

Then I tried the scan example from the pyserial site, but it only shows:
(0) COM1
(1) COM2

So I guess it's either not possible or you have to do something else.

Does anybody have a clue?

Thanks in advanced,
Josef






More information about the Python-list mailing list