Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to pretty-print ctypes composite data types?

Reply
Thread Tools

How to pretty-print ctypes composite data types?

 
 
Grant Edwards
Guest
Posts: n/a
 
      10-25-2011
I'm using ctypes with a library that requires a handful of structure
definitions. The actual definitions and usage aren't a problem. When
it comes time to print out the values in a structure or array, there
doesn't seem to be simple/general way to do that. Am I missing
something?

I presume one can recursively iterate through the fields in a
structure and elements in an array, recursing on any composite types
and printing the values when one finds a type, but I'm surprised
that's not something that's already in the ctypes library somewhere --
the authors certainly seem to have thought of everything else.

--
Grant Edwards grant.b.edwards Yow! I own seven-eighths of
at all the artists in downtown
gmail.com Burbank!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
WindowsXP/ CTypes - How to convert ctypes array to a string? dudeja.rajat@gmail.com Python 0 08-19-2008 10:20 AM
RE: [ctypes-users] [Ann] ctypes 0.9.0 released Henk Punt Python 0 07-23-2004 10:34 PM
Possible to create a composite control that has a child control that is a validator that validates the composite control itself? Jonathan Eric Miller ASP .Net Building Controls 2 07-22-2004 10:58 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM



Advertisments