serial, parallel and USB port

Discussion in 'Python' started by =?ISO-8859-1?Q?St=E9phane?= Nufer, Jul 30, 2003.

  1. Hello,

    Why are there no module to access serial, parallel or USB port in python.
    This could be great to build front end software to control electronic
    device or even automaton in industrial process ( or maybe I should ask why
    the existing third party modules such as pyserial have not been integrated
    in the official release)

    Regards,
    =?ISO-8859-1?Q?St=E9phane?= Nufer, Jul 30, 2003
    #1
    1. Advertising

  2. =?ISO-8859-1?Q?St=E9phane?= Nufer

    Justin Shaw Guest

    Justin Shaw, Jun 20, 2004
    #2
    1. Advertising

  3. =?ISO-8859-1?Q?St=E9phane?= Nufer

    Roger Binns Guest

    > > Why are there no module to access serial, parallel or USB port in python.
    > What about pySerial and pyParallel??? I use pyParallel to control stepper
    > motors.


    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/

    Roger
    Roger Binns, Jun 20, 2004
    #3
  4. on Sat, 19 Jun 2004 20:19:36 -0700
    "Roger Binns" <> 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. Now, I for example do not have MS-C installed - Cygwin is still a World apart and MinGW doesn't compile Python out of the box either.

    So the original posting may also read as:
    why aren't these interface in the standard distribution?

    The answer is probably, "because nobody volunteered to stuff them in there" - but I admit I wish too, these I/O routines were in the standard distribution, especially for the USB stuff, since USB interfaces are ubiquitous nowadays.
    Josef Dalcolmo, Jun 28, 2004
    #4
  5. =?ISO-8859-1?Q?St=E9phane?= Nufer

    Roger Binns Guest

    Josef Dalcolmo wrote:
    > on Sat, 19 Jun 2004 20:19:36 -0700
    > "Roger Binns" <> 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.

    Roger
    Roger Binns, Jun 28, 2004
    #5
  6. on Mon, 28 Jun 2004 09:37:03 -0700
    "Roger Binns" <> wrote:


    > MinGW compiles extensions perfectly including the USB which I have
    > been shipping for almost a year (using the standard Python distribution).


    Oh, many thanks, for this hint. That simplifies things tremendously. I suppose I could even try PyRex with MinGW on Windows!

    Do you need to run MinGW from MSYS or does it any old command prompt box?

    - Josef
    Josef Dalcolmo, Jul 15, 2004
    #6
  7. Lonnie Princehouse, Jul 16, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yakka
    Replies:
    3
    Views:
    8,365
    jc9121
    Aug 17, 2006
  2. Soren
    Replies:
    4
    Views:
    1,241
    c d saunter
    Feb 14, 2008
  3. sun

    USB-to-parallel port programming

    sun, Oct 20, 2009, in forum: C Programming
    Replies:
    1
    Views:
    510
    Flash Gordon
    Oct 20, 2009
  4. John Nagle
    Replies:
    1
    Views:
    1,525
    Tim Golden
    Mar 31, 2011
  5. Guest
    Replies:
    0
    Views:
    773
    Guest
    Mar 31, 2011
Loading...

Share This Page