Re: clean up resources after interrupted page load
Robert Brewer <[email protected]> Sat, 29 Jun 2019 11:33:54 -0700
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <CAJ4gti-fbZrzM-mfy7_OKDuTqBVLCJWWZ11LKOr9eB6d3tomDg@mail.gmail.com> |
--000000000000e0041a058c7aa3de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In Python, you have to explicitly cancel threads inside the thread. So one thing you _can_ do is add a line inside your while loop: "if response.timed_out: raise cherrypy.TimeoutError()". It won't do anything if the thread blocks forever on readline(), but it will allow the thread to exit as long as readline is yielding. On Sat, Jun 29, 2019, 11:25 Sviatoslav Sydorenko < [email protected]> wrote: > Timeout feature has been deprecated because it's not really possible to > cancel threads. The solution would be to rewrite the engine to use async > paradigm. > > Try submitting an issue against Cheroot with a minimal reproducer. There'= s > some WIP there which aims to improve the connection management. > > > --Sviatoslav. > > Sent from my phone, please pardon any typos. > > =D1=81=D0=B1, 29 =D1=87=D0=B5=D1=80=D0=B2. 2019, 10:05 =D0=BA=D0=BE=D1=80= =D0=B8=D1=81=D1=82=D1=83=D0=B2=D0=B0=D1=87 Anatoliy Kushner <lamazavra@gmai= l.com> > =D0=BF=D0=B8=D1=88=D0=B5: > >> With sample code below if subscriber interrupt page load somewhere >> between client.connect and client.close() then cherrypy will hang and wi= ll >> not clean up used resources like: 1) open tcp socket (from netstat -anpt= on >> this server i see tcp connections to server that is established for some >> days, while time to executing any commands should finish in 10 sec) 2) f= rom >> ps -p 'cherrypy pid' H , i see , that number of threads increased, and >> number of threads equals number of unclosed tcp connections >> >> while debugging this i found that thread stop at "yield bytes(a, >> 'utf-8')" in while loop. So , is there any way to say cherrypy to kill >> threads after some timeout ? >> >> P.S. response.timeout =3D 30 already set in config and this does not hel= p >> >> >> >> @cherrypy.expose >> >> def test(self, *args, **kwargs): >> ... >> ... >> def getData(host, cmd): >> html =3D open("menuRp1.html").read() >> yield bytes(html, 'utf-8') >> client =3D paramiko.SSHClient() >> client.connect(hostname=3Dhost, username=3Duser, password=3Dpwd, port= =3D22) >> stdin, stdout, stderr =3D client.exec_command(cmd) >> a=3Dstdout.readline() >> while a: >> yield bytes(a, 'utf-8') >> a=3Dstdout.readline() >> client.close() >> html =3D open("menuRp2.html").read() >> yield bytes(html, 'utf-8') >> return getData(h, c) >> test._cp_config =3D {'response.stream': True} >> >> >> >> -- >> You received this message because you are subscribed to the Google Group= s >> "cherrypy-users" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n >> email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] >> To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] >> Visit this group at https://groups.google.com/group/cherrypy-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/cherrypy-users/92d0f922-5e40-4a5c-b3d6= -a99d10ff0830%40googlegroups.com >> <https://groups.google.com/d/msgid/cherrypy-users/92d0f922-5e40-4a5c-b3d= 6-a99d10ff0830%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "cherrypy-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > Visit this group at https://groups.google.com/group/cherrypy-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/cherrypy-users/CAFYONRBoAZFtBsPj1xs3GzL= Dac5iCvww5zd_wVbEPs4gVs_pGQ%40mail.gmail.com > <https://groups.google.com/d/msgid/cherrypy-users/CAFYONRBoAZFtBsPj1xs3Gz= LDac5iCvww5zd_wVbEPs4gVs_pGQ%40mail.gmail.com?utm_medium=3Demail&utm_source= =3Dfooter> > . > For more options, visit https://groups.google.com/d/optout. > --=20 You received this message because you are subscribed to the Google Groups "= cherrypy-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/cherrypy-users. To view this discussion on the web visit https://groups.google.com/d/msgid/= cherrypy-users/CAJ4gti-fbZrzM-mfy7_OKDuTqBVLCJWWZ11LKOr9eB6d3tomDg%40mail.g= mail.com. For more options, visit https://groups.google.com/d/optout. --000000000000e0041a058c7aa3de Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"auto">In Python, you have to explicitly cancel= threads inside the thread. So one thing you _can_ do is add a line inside = your while loop: "if response.timed_out: raise cherrypy.TimeoutError()= ". It won't do anything if the thread blocks forever on readline()= , but it will allow the thread to exit as long as readline is yielding.</di= v></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Sat, Jun 29, 201= 9, 11:25 Sviatoslav Sydorenko <<a href=3D"mailto:[email protected]= g.ua" target=3D"_blank">[email protected]</a>> wrote:<br></div= ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border= -left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"auto">Timeou= t feature has been deprecated because it's not really possible to cance= l threads. The solution would be to rewrite the engine to use async paradig= m.<div dir=3D"auto"><br></div><div dir=3D"auto">Try submitting an issue aga= inst Cheroot with a minimal reproducer. There's some WIP there which ai= ms to improve the connection management.</div><div dir=3D"auto"><br><br><di= v dir=3D"auto">--Sviatoslav.<br><br>Sent from my phone, please pardon any t= ypos.</div></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas= s=3D"gmail_attr">=D1=81=D0=B1, 29 =D1=87=D0=B5=D1=80=D0=B2. 2019, 10:05 =D0= =BA=D0=BE=D1=80=D0=B8=D1=81=D1=82=D1=83=D0=B2=D0=B0=D1=87 Anatoliy Kushner = <<a href=3D"mailto:[email protected]" rel=3D"noreferrer" target=3D"_bl= ank">[email protected]</a>> =D0=BF=D0=B8=D1=88=D0=B5:<br></div><blockq= uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p= x solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><p>With sample = code below if subscriber interrupt page load somewhere=20 between client.connect and client.close() then cherrypy will hang and=20 will not clean up used resources like: 1) open tcp socket (from netstat -anpt on this server i see tcp=20 connections to server that is established for some days, while time to=20 executing any commands should finish in 10 sec) 2) from ps -p 'cherrypy pid' H , i see , that number of threads=20 increased, and number of threads equals number of unclosed tcp=20 connections</p> <p>while debugging this i found that thread stop at "yield bytes(a, &#= 39;utf-8')" in while loop.=20 So , is there any way to say cherrypy to kill threads after some timeout ? = </p> <p>P.S. response.timeout =3D 30 already set in config and this does not he= lp</p><p><br></p><p><br></p><p></p><div style=3D"background-color:rgb(250,2= 50,250);border-color:rgb(187,187,187);border-style:solid;border-width:1px" = class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_797409164813046= 2222prettyprint"><code class=3D"gmail-m_4929671620564195456m_-3248843328004= 254059m_7974091648130462222prettyprint"><div class=3D"gmail-m_4929671620564= 195456m_-3248843328004254059m_7974091648130462222subprettyprint"><code><spa= n style=3D"color:rgb(0,102,102)" class=3D"gmail-m_4929671620564195456m_-324= 8843328004254059m_7974091648130462222styled-by-prettify">@cherrypy</span><s= pan style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3= 248843328004254059m_7974091648130462222styled-by-prettify">.</span><span st= yle=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433280= 04254059m_7974091648130462222styled-by-prettify">expose</span></code><span = style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-324884332= 8004254059m_7974091648130462222styled-by-prettify"><br></span><code></code>= <pre class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648= 130462222lang-py gmail-m_4929671620564195456m_-3248843328004254059m_7974091= 648130462222prettyprint gmail-m_4929671620564195456m_-3248843328004254059m_= 7974091648130462222prettyprinted"><code><span style=3D"color:rgb(0,0,136)" = class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_797409164813046= 2222styled-by-prettify">def</span><span style=3D"color:rgb(0,0,0)" class=3D= "gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styl= ed-by-prettify"> test</span><span style=3D"color:rgb(102,102,0)" class=3D"g= mail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled= -by-prettify">(</span><span style=3D"color:rgb(0,0,136)" class=3D"gmail-m_4= 929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pret= tify">self</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929= 671620564195456m_-3248843328004254059m_7974091648130462222styled-by-prettif= y">,</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_49296716205641= 95456m_-3248843328004254059m_7974091648130462222styled-by-prettify"> </span= ><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m= _-3248843328004254059m_7974091648130462222styled-by-prettify">*</span><span= style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433= 28004254059m_7974091648130462222styled-by-prettify">args</span><span style= =3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328= 004254059m_7974091648130462222styled-by-prettify">,</span><span style=3D"co= lor:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m= _7974091648130462222styled-by-prettify"> </span><span style=3D"color:rgb(10= 2,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79740= 91648130462222styled-by-prettify">**</span><span style=3D"color:rgb(0,0,0)"= class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79740916481304= 62222styled-by-prettify">kwargs</span><span style=3D"color:rgb(102,102,0)" = class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_797409164813046= 2222styled-by-prettify">):</span><span style=3D"color:rgb(0,0,0)" class=3D"= gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222style= d-by-prettify"><br>=C2=A0</span><span style=3D"color:rgb(102,102,0)" class= =3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222s= tyled-by-prettify">...</span><span style=3D"color:rgb(0,0,0)" class=3D"gmai= l-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by= -prettify"><br>=C2=A0</span><span style=3D"color:rgb(102,102,0)" class=3D"g= mail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled= -by-prettify">...</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4= 929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pret= tify"><br>=C2=A0</span><span style=3D"color:rgb(0,0,136)" class=3D"gmail-m_= 4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pre= ttify">def</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_49296716= 20564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify"> = getData</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671= 620564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify">= (</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_49296716205641954= 56m_-3248843328004254059m_7974091648130462222styled-by-prettify">host</span= ><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m= _-3248843328004254059m_7974091648130462222styled-by-prettify">,</span><span= style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433= 28004254059m_7974091648130462222styled-by-prettify"> cmd</span><span style= =3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328= 004254059m_7974091648130462222styled-by-prettify">):</span><span style=3D"c= olor:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059= m_7974091648130462222styled-by-prettify"><br>=C2=A0 =C2=A0html </span><span= style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248= 843328004254059m_7974091648130462222styled-by-prettify">=3D</span><span sty= le=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-324884332800= 4254059m_7974091648130462222styled-by-prettify"> open</span><span style=3D"= color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042= 54059m_7974091648130462222styled-by-prettify">(</span><span style=3D"color:= rgb(0,136,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7= 974091648130462222styled-by-prettify">"menuRp1.html"</span><span = style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-32488= 43328004254059m_7974091648130462222styled-by-prettify">).</span><span style= =3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042= 54059m_7974091648130462222styled-by-prettify">read</span><span style=3D"col= or:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042540= 59m_7974091648130462222styled-by-prettify">()</span><span style=3D"color:rg= b(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79740= 91648130462222styled-by-prettify"><br>=C2=A0 =C2=A0</span><span style=3D"co= lor:rgb(0,0,136)" class=3D"gmail-m_4929671620564195456m_-324884332800425405= 9m_7974091648130462222styled-by-prettify">yield</span><span style=3D"color:= rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_797= 4091648130462222styled-by-prettify"> bytes</span><span style=3D"color:rgb(1= 02,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974= 091648130462222styled-by-prettify">(</span><span style=3D"color:rgb(0,0,0)"= class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79740916481304= 62222styled-by-prettify">html</span><span style=3D"color:rgb(102,102,0)" cl= ass=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79740916481304622= 22styled-by-prettify">,</span><span style=3D"color:rgb(0,0,0)" class=3D"gma= il-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-b= y-prettify"> </span><span style=3D"color:rgb(0,136,0)" class=3D"gmail-m_492= 9671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pretti= fy">'utf-8'</span><span style=3D"color:rgb(102,102,0)" class=3D"gma= il-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-b= y-prettify">)</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_49296= 71620564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify= "><br>=C2=A0 =C2=A0client </span><span style=3D"color:rgb(102,102,0)" class= =3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222s= tyled-by-prettify">=3D</span><span style=3D"color:rgb(0,0,0)" class=3D"gmai= l-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by= -prettify"> paramiko</span><span style=3D"color:rgb(102,102,0)" class=3D"gm= ail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-= by-prettify">.</span><span style=3D"color:rgb(102,0,102)" class=3D"gmail-m_= 4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pre= ttify">SSHClient</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-= m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-p= rettify">()</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671= 620564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify">= <br>=C2=A0 =C2=A0client</span><span style=3D"color:rgb(102,102,0)" class=3D= "gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styl= ed-by-prettify">.</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4= 929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pret= tify">connect</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4= 929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pret= tify">(</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_49296716205= 64195456m_-3248843328004254059m_7974091648130462222styled-by-prettify">host= name</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620= 564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify">=3D= </span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_492967162056419545= 6m_-3248843328004254059m_7974091648130462222styled-by-prettify">host</span>= <span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_= -3248843328004254059m_7974091648130462222styled-by-prettify">,</span><span = style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-324884332= 8004254059m_7974091648130462222styled-by-prettify"> username</span><span st= yle=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843= 328004254059m_7974091648130462222styled-by-prettify">=3D</span><span style= =3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042= 54059m_7974091648130462222styled-by-prettify">user</span><span style=3D"col= or:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042540= 59m_7974091648130462222styled-by-prettify">,</span><span style=3D"color:rgb= (0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_797409= 1648130462222styled-by-prettify"> password</span><span style=3D"color:rgb(1= 02,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974= 091648130462222styled-by-prettify">=3D</span><span style=3D"color:rgb(0,0,0= )" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_797409164813= 0462222styled-by-prettify">pwd</span><span style=3D"color:rgb(102,102,0)" c= lass=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462= 222styled-by-prettify">,</span><span style=3D"color:rgb(0,0,0)" class=3D"gm= ail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-= by-prettify"> port</span><span style=3D"color:rgb(102,102,0)" class=3D"gmai= l-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by= -prettify">=3D</span><span style=3D"color:rgb(0,102,102)" class=3D"gmail-m_= 4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pre= ttify">22</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_49296= 71620564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify= ">)</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_492967162056419= 5456m_-3248843328004254059m_7974091648130462222styled-by-prettify"><br>=C2= =A0 =C2=A0stdin</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m= _4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pr= ettify">,</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_492967162= 0564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify"> s= tdout</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_492967162= 0564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify">,<= /span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456= m_-3248843328004254059m_7974091648130462222styled-by-prettify"> stderr </sp= an><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_492967162056419545= 6m_-3248843328004254059m_7974091648130462222styled-by-prettify">=3D</span><= span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248= 843328004254059m_7974091648130462222styled-by-prettify"> client</span><span= style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248= 843328004254059m_7974091648130462222styled-by-prettify">.</span><span style= =3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042= 54059m_7974091648130462222styled-by-prettify">exec_command</span><span styl= e=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-324884332= 8004254059m_7974091648130462222styled-by-prettify">(</span><span style=3D"c= olor:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059= m_7974091648130462222styled-by-prettify">cmd</span><span style=3D"color:rgb= (102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79= 74091648130462222styled-by-prettify">)</span><span style=3D"color:rgb(0,0,0= )" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_797409164813= 0462222styled-by-prettify"><br>=C2=A0 =C2=A0a</span><span style=3D"color:rg= b(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7= 974091648130462222styled-by-prettify">=3D</span><span style=3D"color:rgb(0,= 0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_797409164= 8130462222styled-by-prettify">stdout</span><span style=3D"color:rgb(102,102= ,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648= 130462222styled-by-prettify">.</span><span style=3D"color:rgb(0,0,0)" class= =3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222s= tyled-by-prettify">readline</span><span style=3D"color:rgb(102,102,0)" clas= s=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222= styled-by-prettify">()</span><span style=3D"color:rgb(0,0,0)" class=3D"gmai= l-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by= -prettify"><br>=C2=A0 =C2=A0</span><span style=3D"color:rgb(0,0,136)" class= =3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222s= tyled-by-prettify">while</span><span style=3D"color:rgb(0,0,0)" class=3D"gm= ail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-= by-prettify"> a</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m= _4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pr= ettify">:</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_492967162= 0564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify"><b= r>=C2=A0 =C2=A0 =C2=A0</span><span style=3D"color:rgb(0,0,136)" class=3D"gm= ail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-= by-prettify">yield</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_= 4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pre= ttify"> bytes</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4= 929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-pret= tify">(</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_49296716205= 64195456m_-3248843328004254059m_7974091648130462222styled-by-prettify">a</s= pan><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_49296716205641954= 56m_-3248843328004254059m_7974091648130462222styled-by-prettify">,</span><s= pan style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488= 43328004254059m_7974091648130462222styled-by-prettify"> </span><span style= =3D"color:rgb(0,136,0)" class=3D"gmail-m_4929671620564195456m_-324884332800= 4254059m_7974091648130462222styled-by-prettify">'utf-8'</span><span= style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248= 843328004254059m_7974091648130462222styled-by-prettify">)</span><span style= =3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042= 54059m_7974091648130462222styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0a</sp= an><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_492967162056419545= 6m_-3248843328004254059m_7974091648130462222styled-by-prettify">=3D</span><= span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248= 843328004254059m_7974091648130462222styled-by-prettify">stdout</span><span = style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-32488= 43328004254059m_7974091648130462222styled-by-prettify">.</span><span style= =3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042= 54059m_7974091648130462222styled-by-prettify">readline</span><span style=3D= "color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004= 254059m_7974091648130462222styled-by-prettify">()</span><span style=3D"colo= r:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7= 974091648130462222styled-by-prettify"><br>=C2=A0 =C2=A0client</span><span s= tyle=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-324884= 3328004254059m_7974091648130462222styled-by-prettify">.</span><span style= =3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042= 54059m_7974091648130462222styled-by-prettify">close</span><span style=3D"co= lor:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254= 059m_7974091648130462222styled-by-prettify">()</span><span style=3D"color:r= gb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974= 091648130462222styled-by-prettify"><br>=C2=A0 =C2=A0html </span><span style= =3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328= 004254059m_7974091648130462222styled-by-prettify">=3D</span><span style=3D"= color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-324884332800425405= 9m_7974091648130462222styled-by-prettify"> open</span><span style=3D"color:= rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m= _7974091648130462222styled-by-prettify">(</span><span style=3D"color:rgb(0,= 136,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091= 648130462222styled-by-prettify">"menuRp2.html"</span><span style= =3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328= 004254059m_7974091648130462222styled-by-prettify">).</span><span style=3D"c= olor:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059= m_7974091648130462222styled-by-prettify">read</span><span style=3D"color:rg= b(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7= 974091648130462222styled-by-prettify">()</span><span style=3D"color:rgb(0,0= ,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648= 130462222styled-by-prettify"><br>=C2=A0 =C2=A0</span><span style=3D"color:r= gb(0,0,136)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79= 74091648130462222styled-by-prettify">yield</span><span style=3D"color:rgb(0= ,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79740916= 48130462222styled-by-prettify"> bytes</span><span style=3D"color:rgb(102,10= 2,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_797409164= 8130462222styled-by-prettify">(</span><span style=3D"color:rgb(0,0,0)" clas= s=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222= styled-by-prettify">html</span><span style=3D"color:rgb(102,102,0)" class= =3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222s= tyled-by-prettify">,</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-= m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-p= rettify"> </span><span style=3D"color:rgb(0,136,0)" class=3D"gmail-m_492967= 1620564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify"= >'utf-8'</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-= m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-by-p= rettify">)</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_49296716= 20564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify"><= br>=C2=A0</span><span style=3D"color:rgb(0,0,136)" class=3D"gmail-m_4929671= 620564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify">= return</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_492967162056= 4195456m_-3248843328004254059m_7974091648130462222styled-by-prettify"> getD= ata</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_49296716205= 64195456m_-3248843328004254059m_7974091648130462222styled-by-prettify">(</s= pan><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_= -3248843328004254059m_7974091648130462222styled-by-prettify">h</span><span = style=3D"color:rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-32488= 43328004254059m_7974091648130462222styled-by-prettify">,</span><span style= =3D"color:rgb(0,0,0)" class=3D"gmail-m_4929671620564195456m_-32488433280042= 54059m_7974091648130462222styled-by-prettify"> c</span><span style=3D"color= :rgb(102,102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059= m_7974091648130462222styled-by-prettify">)</span><span style=3D"color:rgb(0= ,0,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79740916= 48130462222styled-by-prettify"><br>test</span><span style=3D"color:rgb(102,= 102,0)" class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091= 648130462222styled-by-prettify">.</span><span style=3D"color:rgb(0,0,0)" cl= ass=3D"gmail-m_4929671620564195456m_-3248843328004254059m_79740916481304622= 22styled-by-prettify">_cp_config </span><span style=3D"color:rgb(102,102,0)= " class=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130= 462222styled-by-prettify">=3D</span><span style=3D"color:rgb(0,0,0)" class= =3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222s= tyled-by-prettify"> </span><span style=3D"color:rgb(102,102,0)" class=3D"gm= ail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-= by-prettify">{</span><span style=3D"color:rgb(0,136,0)" class=3D"gmail-m_49= 29671620564195456m_-3248843328004254059m_7974091648130462222styled-by-prett= ify">'response.stream'</span><span style=3D"color:rgb(102,102,0)" c= lass=3D"gmail-m_4929671620564195456m_-3248843328004254059m_7974091648130462= 222styled-by-prettify">:</span><span style=3D"color:rgb(0,0,0)" class=3D"gm= ail-m_4929671620564195456m_-3248843328004254059m_7974091648130462222styled-= by-prettify"> </span><span style=3D"color:rgb(0,0,136)" class=3D"gmail-m_49= 29671620564195456m_-3248843328004254059m_7974091648130462222styled-by-prett= ify">True</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_49296= 71620564195456m_-3248843328004254059m_7974091648130462222styled-by-prettify= ">}</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_492967162056419= 5456m_-3248843328004254059m_7974091648130462222styled-by-prettify"> </span>= </code></pre></div></code></div><br><br><p></p></div> <p></p> -- <br> You received this message because you are subscribed to the Google Groups &= quot;cherrypy-users" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:cherrypy-users+unsubscribe-/[email protected]" rel= =3D"noreferrer noreferrer" target=3D"_blank">cherrypy-users+unsubscribe@goo= glegroups.com</a>.<br> To post to this group, send email to <a href=3D"mailto:cherrypy-users@googl= egroups.com" rel=3D"noreferrer noreferrer" target=3D"_blank">cherrypy-users= @googlegroups.com</a>.<br> Visit this group at <a href=3D"https://groups.google.com/group/cherrypy-use= rs" rel=3D"noreferrer noreferrer" target=3D"_blank">https://groups.google.c= om/group/cherrypy-users</a>.<br> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/cherrypy-users/92d0f922-5e40-4a5c-b3d6-a99d10ff0830%40googlegrou= ps.com?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"noreferrer norefe= rrer" target=3D"_blank">https://groups.google.com/d/msgid/cherrypy-users/92= d0f922-5e40-4a5c-b3d6-a99d10ff0830%40googlegroups.com</a>.<br> For more options, visit <a href=3D"https://groups.google.com/d/optout" rel= =3D"noreferrer noreferrer" target=3D"_blank">https://groups.google.com/d/op= tout</a>.<br> </blockquote></div> <p></p> -- <br> You received this message because you are subscribed to the Google Groups &= quot;cherrypy-users" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:cherrypy-users+unsubscribe-/[email protected]" rel= =3D"noreferrer" target=3D"_blank">[email protected]= om</a>.<br> To post to this group, send email to <a href=3D"mailto:cherrypy-users@googl= egroups.com" rel=3D"noreferrer" target=3D"_blank">cherrypy-users@googlegrou= ps.com</a>.<br> Visit this group at <a href=3D"https://groups.google.com/group/cherrypy-use= rs" rel=3D"noreferrer" target=3D"_blank">https://groups.google.com/group/ch= errypy-users</a>.<br> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/cherrypy-users/CAFYONRBoAZFtBsPj1xs3GzLDac5iCvww5zd_wVbEPs4gVs_p= GQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nore= ferrer" target=3D"_blank">https://groups.google.com/d/msgid/cherrypy-users/= CAFYONRBoAZFtBsPj1xs3GzLDac5iCvww5zd_wVbEPs4gVs_pGQ%40mail.gmail.com</a>.<b= r> For more options, visit <a href=3D"https://groups.google.com/d/optout" rel= =3D"noreferrer" target=3D"_blank">https://groups.google.com/d/optout</a>.<b= r> </blockquote></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;cherrypy-users" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:cherrypy-users+unsubscribe-/[email protected]">cher= rypy-users+unsubscribe-/[email protected]</a>.<br /> To post to this group, send email to <a href=3D"mailto:cherrypy-users@googl= egroups.com">cherrypy-users-/[email protected]</a>.<br /> Visit this group at <a href=3D"https://groups.google.com/group/cherrypy-use= rs">https://groups.google.com/group/cherrypy-users</a>.<br /> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/cherrypy-users/CAJ4gti-fbZrzM-mfy7_OKDuTqBVLCJWWZ11LKOr9eB6d3tom= Dg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.= google.com/d/msgid/cherrypy-users/CAJ4gti-fbZrzM-mfy7_OKDuTqBVLCJWWZ11LKOr9= eB6d3tomDg%40mail.gmail.com</a>.<br /> For more options, visit <a href=3D"https://groups.google.com/d/optout">http= s://groups.google.com/d/optout</a>.<br /> --000000000000e0041a058c7aa3de--