Re: Sending USB commands with Python

Discussion in 'Python' started by Cameron Simpson, Aug 29, 2012.

  1. On 29Aug2012 17:57, Dennis Lee Bieber <> wrote:
    | On Wed, 29 Aug 2012 14:21:30 -0700 (PDT), "Adam W."
    | <> declaimed the following in
    | gmane.comp.python.general:
    | > You are correct about the 2 being the number of bytes written. However when I issue a read command I get:
    | >
    | > >>> ep.write('\x1BA')
    | > 4
    |
    | That's interesting -- as if each byte you send is expanding into a
    | pair of bytes.

    UTF-16? ISTR that Windows often uses big endian UTF-16 for filenames and
    text data; could there be some default encoding in ep.write getting in
    your way?

    Disclaimer: I'm really not a Windows guy.
    --
    Cameron Simpson <>

    There are too many people now for everyone to be entitled to his own opinion.
    - Dr. Handelman
     
    Cameron Simpson, Aug 29, 2012
    #1
    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. Adam W.

    Sending USB commands with Python

    Adam W., Aug 29, 2012, in forum: Python
    Replies:
    8
    Views:
    1,246
    Dennis Lee Bieber
    Aug 29, 2012
  2. Dennis Lee Bieber

    Re: Sending USB commands with Python

    Dennis Lee Bieber, Aug 29, 2012, in forum: Python
    Replies:
    8
    Views:
    371
    Cameron Simpson
    Aug 30, 2012
  3. Cameron Simpson

    Re: Sending USB commands with Python

    Cameron Simpson, Aug 30, 2012, in forum: Python
    Replies:
    0
    Views:
    189
    Cameron Simpson
    Aug 30, 2012
  4. Replies:
    8
    Views:
    213
  5. Setia Budi

    Send commands to USB device in Python

    Setia Budi, Feb 11, 2014, in forum: Python
    Replies:
    1
    Views:
    97
Loading...

Share This Page