Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #28027
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2012-08-28 15:35 -0700 |
| References | <2cc8b390-0b7a-4a0f-ac88-113daf65eba5@googlegroups.com> <mailman.3811.1345922216.4697.python-list@python.org> |
| 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> |
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