[Python-bugs-list] [Bug #129000] struct should handle terminated strings

noreply@sourceforge.net noreply@sourceforge.net
Tue, 16 Jan 2001 06:20:33 -0800


Bug #129000, was updated on 2001-Jan-16 05:36
Here is a current snapshot of the bug.

Project: Python
Category: Extension Modules
Status: Closed
Resolution: Wont Fix
Bug Group: Feature Request
Priority: 5
Submitted by: jahs
Assigned to : gvanrossum
Summary: struct should handle terminated strings

Details: Currently, python only handles fixed length strings and Pascal
strings. It would be nice if struct could handle null-terminated strings,
perhaps using "n" to denote them.
A more general solution would be to allow arbitrary terminators for
terminated strings.


Follow-Ups:

Date: 2001-Jan-16 06:20
By: gvanrossum

Comment:
Decoding variable-lenth strings is not possible with the struct module.  If
the string space is fixed-length but you want it truncated at the first \0,
I suggest that you write a little helper routine yourself.

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=129000&group_id=5470