> If you are reading arbitrary bytes then it will likely not always "look"
> like integers. What you probably meant is:
>
> for i in data:
> print "%d, " % ord(i)
That's it! :-)
Thanks a lot.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jan 13, 2009 at 12:02 PM, Santiago Romero wrote:
>
> Hi.
>
> Until now, all my python programs worked with text files. But now I'm
> porting an small old C program I wrote lot of years ago to python and
> I'm having problems with datatypes (I think).
>
> some C code:
>
> fp = fopen( fi
On Tue, 2009-01-13 at 12:02 -0800, Santiago Romero wrote:
> Hi.
>
> Until now, all my python programs worked with text files. But now I'm
> porting an small old C program I wrote lot of years ago to python and
> I'm having problems with datatypes (I think).
>
> some C code:
>
> fp = fopen( fi
Hi.
Until now, all my python programs worked with text files. But now I'm
porting an small old C program I wrote lot of years ago to python and
I'm having problems with datatypes (I think).
some C code:
fp = fopen( file, "rb");
while !feof(fp)
{
value = fgetc(fp);
printf("%d", val