serial, parallel and USB port
rogerb at rogerbinns.com
Mon Jun 28 18:37:03 CEST 2004
Josef Dalcolmo wrote:
> on Sat, 19 Jun 2004 20:19:36 -0700
> "Roger Binns" <rogerb at rogerbinns.com> wrote:
> > And if you want USB access, I have done a Python wrapper around libusb
> > that works on Windows, Linux and Mac:
> > http://cvs.sourceforge.net/viewcvs.py/bitpim/bitpim/native/usb/
> Interesting. From a first glance at it I think one has to compile the extension oneself.
That is correct for all platforms.
> Now, I for example do not have MS-C installed
Neither do I.
> Cygwin is still a World apart
I don't have Cygwin installed either.
> and MinGW doesn't compile Python out of the box either.
That doesn't matter. Why do you need to compile the whole of Python?
MinGW compiles extensions perfectly including the USB which I have
been shipping for almost a year (using the standard Python distribution).
Just use MinGW and you will have happy USB access on Windows. The other
platforms work fine with the standard system compiler (gcc).
You can also compile any distustils based extension as well using mingw:
python setup.py build --compiler=mingw32 bdist_wininst
> So the original posting may also read as:
> why aren't these interface in the standard distribution?
A different answer is because it ties their release schedule to that of Python
rather than their underlying libraries. The Windows version of pyserial uses
win32all which isn't a standard part of Python on that platform. My USB stuff
depends on libusb which has a seperate release schedule to Python.
In reality they are not very popular. pyserial manages just over 1,000 downloads
a month and I have no idea how much the USB stuff is, but suspect it is closer
to 5 a month.
Python defines an extension mechanism that is fairly easy to use to distribute
extensions. I don't see what the difficulty in using them is. And if you
need a C compiler on Windows, MinGW does the job fine.
More information about the Python-list