Help?? Struct packing of Date time not has stopped working??!?!

Benjamin Schollnick junkster at nospam.rochester.rr.com
Wed Dec 15 17:27:27 EST 1999


On Wed, 15 Dec 1999 13:30:14, "Klaus Baldermann" 
<kbaldermann at entire-systems.com> wrote:

> One of my first Python exercises was a (rdate) client.
> It had the problem that the read_all() sometimes
> returned less than 4 characters.
> This happened only intermittently, so I simply
> put a loop around the thing:

The problem is that this does not appear to be happening 
intermittently.

Both !L, & !d (Long, and Double), were not unpacking
correctly.

Which seemed strange, but I just tried again today, and
it appears to be working okay....

> Of course, this is most inelegant solution (might even take looong),
> and I still don't know what the reason was/is. I thought about nulls '\0',
> but now I think it might have to do with newlines. What will telnetlib's
> read_all()
> return if the data is containing newlines? Will it return a string with
> embedded \n's
> or a list of strings, like a file's readlines() method?

I'm starting to favor your comment here.....As a possible point
of attack.

Is there someway to have telnetlib return BINARY data directly?
Or hex encoded, etc?

That way the return/linefeed's are not corrupting data?
I'll have to examine the telnet library, and see if there is
some provision for that....


			- Benjamin



More information about the Python-list mailing list