looking for blocking on read of a real file (not socket or pipe)

S

Steven

Hello,
I'm seeking a read method that will block until new data is available. Is
there such a python function that does that?

Thanks,

Steven Howe
 
P

Peter Hansen

Steven said:
I'm seeking a read method that will block until new data is available. Is
there such a python function that does that?

It may be relevant which platform(s) are of interest. Linux?
Mac? Windows? All? The more cross-platform this needs to
be, the less likely it exists...
 
E

elbertlev

I doubt that the recipe you recomended will work at all in the case of
different processes. To do this right file has to be open in shared
mode (by both programs). Python does not support shared access.
In the case of one program, but different threads probably this will
work.
 
F

Fredrik Lundh

I doubt that the recipe you recomended will work at all in the case of
different processes. To do this right file has to be open in shared
mode (by both programs). Python does not support shared access.
In the case of one program, but different threads probably this will
work.

do you always assume that everyone uses the same operating system as
you do? (even if the user agent they used to post the message doesn't run
on your operating system... ;-)

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top