Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #28027
| Received | by 10.224.186.143 with SMTP id cs15mr8685qab.3.1346193358394; Tue, 28 Aug 2012 15:35:58 -0700 (PDT) |
|---|---|
| Received | by 10.236.185.98 with SMTP id t62mr1373431yhm.7.1346193358343; Tue, 28 Aug 2012 15:35:58 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!r1no25340560qas.0!news-out.google.com!da15ni48885608qab.0!nntp.google.com!r1no2642963qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Tue, 28 Aug 2012 15:35:58 -0700 (PDT) |
| In-Reply-To | <mailman.3811.1345922216.4697.python-list@python.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=86.26.195.253; posting-account=q-eYcwkAAABs2oHZOqATxktPXe8hl2vw |
| NNTP-Posting-Host | 86.26.195.253 |
| References | <2cc8b390-0b7a-4a0f-ac88-113daf65eba5@googlegroups.com> <mailman.3811.1345922216.4697.python-list@python.org> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <f8a1ab56-5387-4e3f-b3ef-2f047973f857@googlegroups.com> (permalink) |
| Subject | Re: issue with struct.unpack |
| From | 9bizy <a.m.akingbulu-11@student.lboro.ac.uk> |
| Cc | python-list@python.org |
| Injection-Date | Tue, 28 Aug 2012 22:35:58 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.lang.python:28027 |
Show key headers only | View raw
On Saturday, 25 August 2012 20:16:54 UTC+1, MRAB wrote:
> On 25/08/2012 19:34, 9bizy wrote:
>
> > I am trying to unpack values from sensor data I am retrieving through
>
> > a serial cable, but I get errors while using struct.unpack, how can I
>
> > use struct.unpack to unload the data in a readable format?
>
> >
>
> > I checked the python documentation for struct and I can seen to find
>
> > any argument for this.
>
> >
>
> > I have data = struct.unpack('char',data) but I still get errors
>
> >
>
> The format strings are described here for Python 3:
>
>
>
> http://docs.python.org/3.2/library/struct.html
>
>
>
> and here for Python 2:
>
>
>
> http://docs.python.org/2.7/library/struct.html
I used this documents but they do not explain or provide an example on how to use struct.unpack for sensor data from an external source or even data from a excel sheet.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
issue with struct.unpack 9bizy <a.m.akingbulu-11@student.lboro.ac.uk> - 2012-08-25 11:34 -0700
Re: issue with struct.unpack Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-25 20:12 +0100
Re: issue with struct.unpack MRAB <python@mrabarnett.plus.com> - 2012-08-25 20:16 +0100
Re: issue with struct.unpack 9bizy <a.m.akingbulu-11@student.lboro.ac.uk> - 2012-08-28 15:35 -0700
Re: issue with struct.unpack MRAB <python@mrabarnett.plus.com> - 2012-08-28 23:53 +0100
Re: issue with struct.unpack Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-28 22:40 -0400
Re: issue with struct.unpack 9bizy <a.m.akingbulu-11@student.lboro.ac.uk> - 2012-08-28 15:35 -0700
Re: issue with struct.unpack Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-25 19:31 -0400
Re: issue with struct.unpack Alexander Blinne <news@blinne.net> - 2012-08-26 14:53 +0200
Re: issue with struct.unpack MRAB <python@mrabarnett.plus.com> - 2012-08-28 23:49 +0100
Re: issue with struct.unpack 9bizy <a.m.akingbulu-11@student.lboro.ac.uk> - 2012-08-28 16:01 -0700
Re: issue with struct.unpack MRAB <python@mrabarnett.plus.com> - 2012-08-29 00:36 +0100
Re: issue with struct.unpack 9bizy <a.m.akingbulu-11@student.lboro.ac.uk> - 2012-08-28 16:55 -0700
Re: issue with struct.unpack 9bizy <a.m.akingbulu-11@student.lboro.ac.uk> - 2012-08-28 16:55 -0700
Re: issue with struct.unpack Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-28 22:31 -0400
csiph-web