Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #28088
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'interpreted': 0.07; 'lines.': 0.07; '"a"': 0.09; 'encode': 0.09; 'notation': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'aug': 0.13; 'read.': 0.13; 'weird': 0.15; '8-bit': 0.16; 'hex': 0.16; 'introduces': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'stripped': 0.16; 'wed,': 0.16; 'string': 0.17; 'byte': 0.17; 'bytes': 0.17; 'odd': 0.17; 'trying': 0.21; 'work,': 0.22; 'example': 0.23; 'skip:e 40': 0.27; 'regular': 0.27; 'header:X-Complaints-To:1': 0.28; 'subject:Sending': 0.29; 'stuff': 0.30; 'print': 0.32; 'getting': 0.33; 'url:home': 0.33; 'to:addr:python-list': 0.33; "can't": 0.34; 'text.': 0.35; 'received:org': 0.36; 'really': 0.36; 'explain': 0.36; 'but': 0.36; 'subject:with': 0.36; 'charset:us- ascii': 0.36; 'does': 0.37; 'two': 0.37; 'being': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'claim': 0.60; 'easy': 0.60; 'times': 0.63; 'results': 0.65; 'bar:': 0.84; 'subject:commands': 0.84; 'dennis': 0.91; 'received:108': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
| Subject | Re: Sending USB commands with Python |
| Date | Thu, 30 Aug 2012 00:55:03 -0400 |
| Organization | > Bestiaria Support Staff < |
| References | <eq3t38542luf3dmula4k92islpa9lh0opk@invalid.netcom.com> <20120829222932.GA18700@cskk.homeip.net> <mailman.3947.1346280975.4697.python-list@python.org> <ad907349-042b-4ddf-aef7-043d7dfb1f9a@googlegroups.com> <mailman.3952.1346292474.4697.python-list@python.org> <5d063028-3d3f-42f2-8787-b33d58460c35@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | adsl-108-68-176-60.dsl.klmzmi.sbcglobal.net |
| X-Newsreader | Forte Agent 3.3/32.846 |
| X-No-Archive | YES |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3957.1346302513.4697.python-list@python.org> (permalink) |
| Lines | 20 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1346302513 news.xs4all.nl 6841 [2001:888:2000:d::a6]:53992 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:28088 |
Show key headers only | View raw
On Wed, 29 Aug 2012 20:53:48 -0700 (PDT), "Adam W."
<AWasilenko@gmail.com> declaimed the following in
gmane.comp.python.general:
> Your notation does work, and I was just coming around to reevaluating the use of the encode because I am getting really odd results when trying to print lines.
>
> For example I set the byte length to 10 and sent this 500 times or so expecting to get a solid black bar:
> ep.write('\x16FFFFFFFFFF'.encode('utf-8'))
How many bytes did it claim to send?
>
> But what I got was a weird stripped pattern... I feel like a lot of my commands are working by chance, I can't explain to myself why the A in \x1bA isn't being treated as part of the hex. This stuff always confuses me.
>
That's the easy one -- \x in a string introduces an 8-bit byte value
-- so only two hex digits well be read. The "A" is interpreted as
regular text.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Sending USB commands with Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-29 18:56 -0400
Re: Sending USB commands with Python "Adam W." <AWasilenko@gmail.com> - 2012-08-29 16:45 -0700
Re: Sending USB commands with Python MRAB <python@mrabarnett.plus.com> - 2012-08-30 01:53 +0100
Re: Sending USB commands with Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-29 22:07 -0400
Re: Sending USB commands with Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-30 00:55 -0400
Re: Sending USB commands with Python "Adam W." <AWasilenko@gmail.com> - 2012-08-30 05:51 -0700
Re: Sending USB commands with Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-30 14:24 -0400
Re: Sending USB commands with Python Cameron Simpson <cs@zip.com.au> - 2012-08-31 08:47 +1000
csiph-web