Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Pack integer values as single bytes in a struct
Post: RE: Pack integer values as single bytes in a struc...

I found the mistake in my code; now it works with the struct pack function: import struct values = [] for value in range(0, 128): values.append(value) value_obj = struct.Struct('%dB' % 128) va...
bhdschmidt General Coding Help 3 2,354 Jun-09-2020, 09:23 PM
    Thread: Pack integer values as single bytes in a struct
Post: RE: Pack integer values as single bytes in a struc...

Thank you, Gribouillis! It works!
bhdschmidt General Coding Help 3 2,354 Jun-07-2020, 08:17 PM
    Thread: Pack integer values as single bytes in a struct
Post: Pack integer values as single bytes in a struct

Hello, I try to put 128 values into a struct to write this data of the struct to a file. This is my code: import struct values = [] for value in range(0, 128): values.append(value) value_data ...
bhdschmidt General Coding Help 3 2,354 Jun-07-2020, 06:16 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020