Python, Twisted , Autobahn Non blocking urllib.urlretrieve code snippet needed

#1

I’m looking for a twisted equivalent code snippet for making the urllib.urlretrieve non blocking.

I think i have seen an example of this when i had searched for it sometime back , but i cant seem to find it.

The problem i have with blocking urlretrieve is that it blocks and my client application which uses it , fails to sendPong (heartbeat)

because of which , the server is now blocked and waits for the client to fully download the file before servicing any more requests ,

you can see my concern here , with Huge files being downloaded by the client , the server thinks that the client is inactive or disconnected.

0 Likes

#2

Maybe this helps:

http://twistedmatrix.com/documents/current/web/howto/client.html
http://twistedmatrix.com/documents/current/web/examples/

···

Am 11.06.2014 15:25, schrieb Sachin Prabhu:

I'm looking for a twisted equivalent code snippet for making the
*urllib.urlretrieve *non blocking.

0 Likes

#3

Thanks tobias, that was exactly what i was looking for ,

Meanwhile , i was looking how to make my subprocess.popen non blocking ,

here is the code > http://pastebin.com/Yv0HdjTw

Any input would be appreciated.

···

On Thu, Jun 12, 2014 at 12:55 AM, Tobias Oberstein tobias.o...@gmail.com wrote:

Am 11.06.2014 15:25, schrieb Sachin Prabhu:

I’m looking for a twisted equivalent code snippet for making the

*urllib.urlretrieve *non blocking.

Maybe this helps:

http://twistedmatrix.com/documents/current/web/howto/client.html

http://twistedmatrix.com/documents/current/web/examples/

You received this message because you are subscribed to a topic in the Google Groups “Autobahn” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/autobahnws/cR3yyqAZIvU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to autobahnws+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Cheers,
/Sachin Prabhu

0 Likes

#4

Hi Sachin,

···

Am 12.06.2014 08:45, schrieb Sachin Prabhu:

Thanks tobias, that was exactly what i was looking for ,

Meanwhile , i was looking how to make my subprocess.popen non blocking ,
here is the code > http://pastebin.com/Yv0HdjTw

Any input would be appreciated.

My tip: how about using Google? :wink:

http://twistedmatrix.com/documents/current/core/howto/process.html

/Tobias

0 Likes