[Pythonmac-SIG] Problems with multithreaded I/O or import, an yone?

Schollnick, Benjamin Benjamin.Schollnick@usa.xerox.com
Wed, 29 Aug 2001 07:48:40 -0400


>	> 	When I use httplib, to connect to a Docushare Server, and
retrieve
>	> the
>	> resulting XML file, readlines, or read(-1), doesn't seem to work
>	> correctly...
>	> readlines should read the entire document and then return... My
>	> understanding is the
>	> same with read(-1)....
>
>	This is another one. I've always said that "it's not a bug", but I'm
>	not so sure anymore. It may well be a bug, in that it is different
>	than what the Python manual says. (I've always said it isn't a bug
>	because it's what the C library does, but that is not important
>	here). But still, if it is a bug I think it is another one. Although
>	hunting it out may help.

If it's what's expected (due to the C library), then it needs to be
documented
as a variance from the Doc's.... I spent a week trying to figure out why
Docushare
was returning broken XML... (And why the XML was working on other
clients)... And
several days trying different methods until I guessed it was a problem with
how 
readlines & read(-1) was working...

Honestly, it was a frustrating issue.  But it's a major cross-platform
issue...
If someone uses those commands from a PC written python package, it's not
going
to perform the same...

So we either must document it, or what I would suggest instead, is that we
add
a small bit of code, that automatically work's around it simulating the
proper 
behavior...

>	> 	I doubt this is any help, but that's the only major problem
I've
>	> seen with
>	> MacPython.... And of course, the lack of a easy API to the
clock... But I
>	> got around
>	> that one with calldll.... (But it's still kludgy!!) <grin>

> Uhm... What clock? If you've mentioned this one before I've completely
> forgotten it. I would say there's enough interfaces to various clocks
> (time.time(), Evt.TickCount(), MacOS.GetTicks())

This isn't anything that I think that going to change, which is one reason
I didn't go into more detail...

Python has a "read-only" API to the clock, but there is no way to set the
system clock....

If you remember, the first major project I got started with MacPython
was a time client/server application.... Which requires resyncing the 
Macintosh clock...

What I'd love to see is a platform specific routine to properly set the
clock... (In Mac.py?)... But I doubt I'd see this anytime soon....

In my opinion, anything we can read, we should (within limits) be able
to set....Unless there is a good reason for it to be "read-only"...

It goes back to my days of programming for the "dark side", where DOS
has easy interfaces into just about everything if you know the right
memory space...

Of course my second python project was much more successful, a Macintosh
automatic update software package... (Similar to Norton's Live update, or
the Macintosh Software Updates control panel).... Using entirely standard
internet protocols...

				- Benjamin