From fumanchu at amor.org Mon Aug 7 02:05:21 2006 From: fumanchu at amor.org (Robert Brewer) Date: Sun, 6 Aug 2006 17:05:21 -0700 Subject: [Web-SIG] WSGI unquoting rules Message-ID: <435DF58A933BA74397B42CDEB8145A86224C1F@ex9.hostedexchange.local> PEP 333 doesn't directly state whether a WSGI server should unquote the path or the query string before setting SCRIPT_NAME, PATH_INFO, and QUERY_STRING. The "URL Reconstruction" section assumes that the path has been unquoted but not the query string, as do wsgiref.simpleserver and most other WSGI servers in the wild. Shouldn't the spec define this explicitly? Robert Brewer System Architect Amor Ministries fumanchu at amor.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/web-sig/attachments/20060806/4505d001/attachment.htm From pje at telecommunity.com Mon Aug 7 02:50:06 2006 From: pje at telecommunity.com (Phillip J. Eby) Date: Sun, 06 Aug 2006 20:50:06 -0400 Subject: [Web-SIG] WSGI unquoting rules In-Reply-To: <435DF58A933BA74397B42CDEB8145A86224C1F@ex9.hostedexchange. local> Message-ID: <5.1.1.6.0.20060806204206.0205ec80@sparrow.telecommunity.com> At 05:05 PM 8/6/2006 -0700, Robert Brewer wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C6B9B5.2CCFFA4A" > >PEP 333 doesn't directly state whether a WSGI server should unquote the >path or the query string before setting SCRIPT_NAME, PATH_INFO, and >QUERY_STRING. The "URL Reconstruction" section assumes that the path has >been unquoted but not the query string, as do wsgiref.simpleserver and >most other WSGI servers in the wild. > >Shouldn't the spec define this explicitly? These values are defined by the CGI spec, not the WSGI spec, which incorporates the rules of the CGI spec for these variables. See the References section at the end of the PEP. A bit of Googling reveals, by the way, that the Internet-Draft referenced by the PEP has been superseded by an actual RFC for CGI 1.1: http://www.ietf.org/rfc/rfc3875 Apparently this came out after PEP 333 was basically finished, but should probably be updated to reference it in place of the CGI 1.1 draft spec. From ibr at radix50.net Wed Aug 16 14:58:43 2006 From: ibr at radix50.net (Baurzhan Ismagulov) Date: Wed, 16 Aug 2006 14:58:43 +0200 Subject: [Web-SIG] newbie python on web discussion Message-ID: <20060816125843.GD2670@radix50.net> Hello, I'd like to ask some general questions about web-specific issues. Is this list appropriate for that? If not, is there a place better than python-list? With kind regards, Baurzhan. From test at brightphoton.com Thu Aug 17 16:10:47 2006 From: test at brightphoton.com (seth) Date: Thu, 17 Aug 2006 10:10:47 -0400 Subject: [Web-SIG] html dom like javascript ? Message-ID: <44E478E7.50908@brightphoton.com> Is there a python library which is analogous to javascript for creating html/xhtml documents? e.g.: hidden = document.createElement("input") hidden.setAttribute("type", "hidden") hidden.setAttribute("name", "active_flag_hidden_" + ctl) if( dirtyArray[ctl].checked == true) { hidden.setAttribute("value", 'N') } else { hidden.setAttribute("value", 'Y') } document.forms['listForm'].appendChild(hidden) From exarkun at divmod.com Thu Aug 17 17:20:02 2006 From: exarkun at divmod.com (Jean-Paul Calderone) Date: Thu, 17 Aug 2006 11:20:02 -0400 Subject: [Web-SIG] html dom like javascript ? In-Reply-To: <44E478E7.50908@brightphoton.com> Message-ID: <20060817152002.1717.526305948.divmod.quotient.24012@ohm> On Thu, 17 Aug 2006 10:10:47 -0400, seth wrote: >Is there a python library which is analogous to javascript for creating >html/xhtml documents? e.g.: > > hidden = document.createElement("input") > hidden.setAttribute("type", "hidden") > hidden.setAttribute("name", "active_flag_hidden_" + ctl) > if( dirtyArray[ctl].checked == true) { > hidden.setAttribute("value", 'N') > } else { > hidden.setAttribute("value", 'Y') > } > document.forms['listForm'].appendChild(hidden) At least fifty. The DOM API is heavily standardized with hundreds of implementations in dozens of languages. http://python.org/doc/lib/module-xml.dom.html Jean-Paul From test at brightphoton.com Thu Aug 17 18:09:18 2006 From: test at brightphoton.com (seth) Date: Thu, 17 Aug 2006 12:09:18 -0400 Subject: [Web-SIG] html dom like javascript ? In-Reply-To: <20060817152002.1717.526305948.divmod.quotient.24012@ohm> References: <20060817152002.1717.526305948.divmod.quotient.24012@ohm> Message-ID: <44E494AE.1010008@brightphoton.com> Thanks for the rapid reply. I am familiar with a number of these and have searched the web documentation but for the most part these appear to be parsers or things like: http://www.acooke.org/andrew/writing/python-xml.html#code That are xml centric and not html related. I'm looking for something that is more html specific that contains all the options for any html widtget, like a form element with all of its options like style, css, and so forth. In other words I dont want to have to write my own xml file with all the html tags and options. Jean-Paul Calderone wrote: > On Thu, 17 Aug 2006 10:10:47 -0400, seth wrote: >> Is there a python library which is analogous to javascript for creating >> html/xhtml documents? e.g.: >> >> hidden = document.createElement("input") >> hidden.setAttribute("type", "hidden") >> hidden.setAttribute("name", "active_flag_hidden_" + ctl) >> if( dirtyArray[ctl].checked == true) { >> hidden.setAttribute("value", 'N') >> } else { >> hidden.setAttribute("value", 'Y') >> } >> document.forms['listForm'].appendChild(hidden) > > At least fifty. The DOM API is heavily standardized with hundreds of > implementations in dozens of languages. > > http://python.org/doc/lib/module-xml.dom.html > > Jean-Paul > From chrism at plope.com Thu Aug 17 18:59:32 2006 From: chrism at plope.com (Chris McDonough) Date: Thu, 17 Aug 2006 12:59:32 -0400 (EDT) Subject: [Web-SIG] html dom like javascript ? In-Reply-To: <44E494AE.1010008@brightphoton.com> References: <20060817152002.1717.526305948.divmod.quotient.24012@ohm> <44E494AE.1010008@brightphoton.com> Message-ID: <57214.208.29.51.50.1155833972.squirrel@cabana.palladion.com> You probably want elementtree (http://effbot.org/zone/element-index.htm). > > Thanks for the rapid reply. I am familiar with a number of these and > have searched the web documentation but for the most part these appear > to be parsers or things like: > > http://www.acooke.org/andrew/writing/python-xml.html#code > > That are xml centric and not html related. I'm looking for something > that is more html specific that contains all the options for any html > widtget, like a form element with all of its options like style, css, > and so forth. In other words I dont want to have to write my own xml > file with all the html tags and options. > > > > Jean-Paul Calderone wrote: >> On Thu, 17 Aug 2006 10:10:47 -0400, seth wrote: >>> Is there a python library which is analogous to javascript for creating >>> html/xhtml documents? e.g.: >>> >>> hidden = document.createElement("input") >>> hidden.setAttribute("type", "hidden") >>> hidden.setAttribute("name", "active_flag_hidden_" + ctl) >>> if( dirtyArray[ctl].checked == true) { >>> hidden.setAttribute("value", 'N') >>> } else { >>> hidden.setAttribute("value", 'Y') >>> } >>> document.forms['listForm'].appendChild(hidden) >> >> At least fifty. The DOM API is heavily standardized with hundreds of >> implementations in dozens of languages. >> >> http://python.org/doc/lib/module-xml.dom.html >> >> Jean-Paul >> > > _______________________________________________ > Web-SIG mailing list > Web-SIG at python.org > Web SIG: http://www.python.org/sigs/web-sig > Unsubscribe: > http://mail.python.org/mailman/options/web-sig/chrism%40plope.com > > From test at brightphoton.com Thu Aug 17 19:05:16 2006 From: test at brightphoton.com (seth) Date: Thu, 17 Aug 2006 13:05:16 -0400 Subject: [Web-SIG] html dom like javascript ? In-Reply-To: <57214.208.29.51.50.1155833972.squirrel@cabana.palladion.com> References: <20060817152002.1717.526305948.divmod.quotient.24012@ohm> <44E494AE.1010008@brightphoton.com> <57214.208.29.51.50.1155833972.squirrel@cabana.palladion.com> Message-ID: <44E4A1CC.3050007@brightphoton.com> Thanks very much. That does look like what I'm after. Chris McDonough wrote: > You probably want elementtree (http://effbot.org/zone/element-index.htm). > > >> Thanks for the rapid reply. I am familiar with a number of these and >> have searched the web documentation but for the most part these appear >> to be parsers or things like: >> >> http://www.acooke.org/andrew/writing/python-xml.html#code >> >> That are xml centric and not html related. I'm looking for something >> that is more html specific that contains all the options for any html >> widtget, like a form element with all of its options like style, css, >> and so forth. In other words I dont want to have to write my own xml >> file with all the html tags and options. >> >> >> >> Jean-Paul Calderone wrote: >> >>> On Thu, 17 Aug 2006 10:10:47 -0400, seth wrote: >>> >>>> Is there a python library which is analogous to javascript for creating >>>> html/xhtml documents? e.g.: >>>> >>>> hidden = document.createElement("input") >>>> hidden.setAttribute("type", "hidden") >>>> hidden.setAttribute("name", "active_flag_hidden_" + ctl) >>>> if( dirtyArray[ctl].checked == true) { >>>> hidden.setAttribute("value", 'N') >>>> } else { >>>> hidden.setAttribute("value", 'Y') >>>> } >>>> document.forms['listForm'].appendChild(hidden) >>>> >>> At least fifty. The DOM API is heavily standardized with hundreds of >>> implementations in dozens of languages. >>> >>> http://python.org/doc/lib/module-xml.dom.html >>> >>> Jean-Paul >>> >>> >> _______________________________________________ >> Web-SIG mailing list >> Web-SIG at python.org >> Web SIG: http://www.python.org/sigs/web-sig >> Unsubscribe: >> http://mail.python.org/mailman/options/web-sig/chrism%40plope.com >> >> >> > > >