>You might also want to post your version ( and your comparison of
>perl vs. python ).
I didn't post because I was interested in other people's solutions...
The best solution will make it to the next Python distribution.
>Then again, you might not. Some of the perl folks
>seem to have pretty thin skin when it comes to criticism.
I can cope with that now...
>Another thread for discussion is:
> What is missing from python that is in perl.
> ( Or library - but major features only, i.e. something that is a
> real "application stopper" ! )
>
>My nomination:
> pack/unpack to/from binary structures ( for reading binary files )
You can read binary integers using ord() and <<, like the example I
gave in my mail about left shifts. We use this at CWI to read and
write "AIFF" audio files (an EA-IFF subformat). What else do you
need?
> and the python equivalent of 'h2ph' to convert ".h" files into
> a "record description".
> ( I don't *think* there is a way to do this in python. Correct me
> if I'm wrong. )
What's h2ph? What's a "record description"? (You can see I'm not a
Perl hacker :-)
>Any suggestions for a syntax for that routine any different than
>the perl equivalent ? If we exclude longints, the major difference
>I see is dealing with possibly recursive structures: lists, tuples
>and dictionaries. Should the be disallowed ? ( Probably dictionaries
>should be disallowed. ) Should they require a nested format specification ?
>How about wildcard lengths for homogeneous sequences ? ( which might
>suggest a 'length of previous/next sequence in bytes' specifier ? )
(This doesn't make sense to me until I know what h2ph is...)
--Guido van Rossum, CWI, Amsterdam <guido@cwi.nl>
"May your mailbox overflow with messages" (modern Chinese curse)