[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-15 Thread Pierre Quentel
New submission from Pierre Quentel : In CPython 3.10 : Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> @x = 123 File

[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-29 Thread Pierre Quentel
Pierre Quentel added the comment: I found why len() is required, it's to avoid trying to match the subject (thus consuming a part of it) if its length is less than the number of non-star patterns, as explained in the PEP. My mistake, sorry

[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-27 Thread Pierre Quentel
Pierre Quentel added the comment: Oh, I did not invent this class, it is in the test script for pattern matching : https://github.com/python/cpython/blob/6948964ecf94e858448dd28eea634317226d2913/Lib/test/test_patma.py#L1932 With this class, [x, *_, y] matches, but not [x, *w, y

[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-27 Thread Pierre Quentel
Pierre Quentel added the comment: Thanks for the explanations, but I feel unconfortable with the fact that variable-length sequence patterns are implemented the same as unpacking. (sorry if this has been discussed before, I can't find references to the discussions that lead to the current

[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Pierre Quentel
New submission from Pierre Quentel : This code match range(42): case [x, *w, y]: z = 0 sets w to a list with 40 items : the length of the subject, minus the number of non-star subpatterns. But this code (adapted from test_patma_186) enters an infinite loop

[issue44589] Pattern Matching - duplicate keys in mapping patterns

2021-07-09 Thread Pierre Quentel
Pierre Quentel added the comment: Sorry, I don't know C so I can't write a PR for this change. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44589] Pattern Matching - duplicate keys in mapping patterns

2021-07-09 Thread Pierre Quentel
New submission from Pierre Quentel : PEP 634 specifies that "A mapping pattern may not contain duplicate key values. (If all key patterns are literal patterns this is considered a syntax error; otherwise this is a runtime error and will raise ValueError.)" but this is not wh

[issue44085] Remaining invalid rules in simplified grammar

2021-05-09 Thread Pierre Quentel
New submission from Pierre Quentel : In the simplified version of Python grammar at https://docs.python.org/3.10/reference/grammar.html, most 'invalid_' from the complete grammar at https://github.com/python/cpython/blob/3.10/Grammar/python.gram have been removed, but 2 of them remain

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-14 Thread Pierre Quentel
Pierre Quentel added the comment: That was a quick fix, thanks ! -- ___ Python tracker <https://bugs.python.org/issue38469> ___ ___ Python-bugs-list mailin

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pierre Quentel
New submission from Pierre Quentel : PEP 572 says that "an assignment expression occurring in a (...) comprehension (...) binds the target in the containing scope, honoring a nonlocal or global declaration for the target in that scope, if one exists." In Appendix B, the

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2019-09-29 Thread Pierre Quentel
Pierre Quentel added the comment: Now that the PR has been merged, can someone close the issue ? -- ___ Python tracker <https://bugs.python.org/issue20

[issue21705] cgi.py: Multipart with more than one file is misparsed

2019-09-25 Thread Pierre Quentel
Pierre Quentel added the comment: @ethan.furman Yes, in test_cgi.py, the method test_fieldstorage_multipart_w3c https://github.com/python/cpython/blob/master/Lib/test/test_cgi.py#L316) uses a multipart content with 2 files in it (https://github.com/python/cpython/blob/master/Lib/test

[issue21705] cgi.py: Multipart with more than one file is misparsed

2019-09-13 Thread Pierre Quentel
Pierre Quentel added the comment: The patch has been applied some time ago (I couldn't find the exact commit), cf. https://github.com/python/cpython/blob/master/Lib/cgi.py#L750 I think we can close the issue. -- nosy: +quentel ___ Python tracker

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2018-11-28 Thread Pierre Quentel
Pierre Quentel added the comment: I have submitted another Pull Request (10771) that seems to fix the bug while passing all the tests in test_cgi.py -- nosy: +quentel ___ Python tracker <https://bugs.python.org/issue27

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2018-11-28 Thread Pierre Quentel
Change by Pierre Quentel : -- pull_requests: +10015 ___ Python tracker <https://bugs.python.org/issue2> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2018-11-21 Thread Pierre Quentel
Pierre Quentel added the comment: I have submitted PR #10638 to fix this issue. -- ___ Python tracker <https://bugs.python.org/issue20504> ___ ___ Python-bug

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2018-11-21 Thread Pierre Quentel
Change by Pierre Quentel : -- pull_requests: +9885 ___ Python tracker <https://bugs.python.org/issue20504> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2018-11-21 Thread Pierre Quentel
Change by Pierre Quentel : -- pull_requests: +9881 ___ Python tracker <https://bugs.python.org/issue20504> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2018-11-21 Thread Pierre Quentel
Change by Pierre Quentel : -- nosy: +quentel ___ Python tracker <https://bugs.python.org/issue20504> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10486] http.server doesn't set all CGI environment variables

2018-11-13 Thread Pierre Quentel
Pierre Quentel added the comment: The QUERY_STRING value is always set by the code at lines 1135-1137 of http.server: for k in ('QUERY_STRING', 'REMOTE_HOST', 'CONTENT_LENGTH', 'HTTP_USER_AGENT', 'HTTP_COOKIE', 'HTTP_REFERER'): env.setdefault(k, "") The R

[issue10486] http.server doesn't set all CGI environment variables

2018-11-10 Thread Pierre Quentel
Change by Pierre Quentel : -- nosy: +quentel ___ Python tracker <https://bugs.python.org/issue10486> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30576] http.server should support HTTP compression (gzip)

2018-09-22 Thread Pierre Quentel
Pierre Quentel added the comment: I have released the module as httpcompressionserver on PyPI : https://pypi.org/project/httpcompressionserver/ -- ___ Python tracker <https://bugs.python.org/issue30

[issue30576] http.server should support HTTP compression (gzip)

2018-09-15 Thread Pierre Quentel
Pierre Quentel added the comment: Brett, Thanks for taking the time, you and other core devs, to review the PR and to explain why you took this decision. I am disappointed by the result, but I understand the reasons, having to face the same maintenance issues, on a much smaller scale

[issue30576] http.server should support HTTP compression (gzip)

2017-11-23 Thread Pierre Quentel
Pierre Quentel <pierre.quen...@gmail.com> added the comment: On the Github site Raymond Hettinger is mentioned as the reviewer. I don't know how to contact him, can anyone ask him if he can review the PR on time for inclusion in Python 3.7 ? I understand that it's difficult to fin

[issue30576] http.server should support HTTP compression (gzip)

2017-11-11 Thread Pierre Quentel
Pierre Quentel <pierre.quen...@gmail.com> added the comment: I think I have made all the changes requested in the code review (many thanks to the reviewer !). I see that the Pull Request has been flagged "awaiting core review". With the deadline for Python 3.7 comin

[issue30406] async and await should be keywords in 3.7

2017-11-04 Thread Pierre Quentel
Pierre Quentel <pierre.quen...@gmail.com> added the comment: According to PEP 492, async and await should have been deprecated in 3.5 and 3.6, but I don't think they have been : await = 1 def f(async=True): ... don't raise any deprecation warning in 3.6. Since version 3.7 will

[issue30576] http.server should support HTTP compression (gzip)

2017-08-15 Thread Pierre Quentel
Pierre Quentel added the comment: On Python-ideas someone asked if other compressions could be supported besides gzip. The latest version of the PR adds a mechanism for that : SimpleHTTPRequestHandler has a new attribute "compressions", a dictionary that maps compression encodings

[issue30576] http.server should support HTTP compression (gzip)

2017-08-02 Thread Pierre Quentel
Pierre Quentel added the comment: In the latest version of the PR, following Martin's comments : - apply Chunk Transfer for HTTP/1.1 only, change implementation of compression for previous protocols (send gzipped data without Content-Length) - use http.cookiejar to parse the Accept-Encoding

[issue29654] SimpleHTTPRequestHandler should support browser cache

2017-07-29 Thread Pierre Quentel
Pierre Quentel added the comment: Thanks for telling me. I must have run the test hundreds of times now, on a Windows 7 PC, and this bug never occured. Just for my information, why do you add temp.flush() in the "with" block ? I thought the context manager took care of this. 2017-0

[issue30576] http.server should support HTTP compression (gzip)

2017-07-28 Thread Pierre Quentel
Pierre Quentel added the comment: @martin.panter Please forget my previous message. There is a 3rd solution, and you gave it : no Content-Length and close the connection when all (compressed) data has been sent. -- ___ Python tracker <

[issue30576] http.server should support HTTP compression (gzip)

2017-07-26 Thread Pierre Quentel
Pierre Quentel added the comment: @martin.panter For HTTP/1.0, since chunked transfer is not supported, and storage in a temporary file is also not an option, I see 2 possible solutions : - give up compressing big files - it would be a pity, compression is actually made for them... - compress

[issue30576] http.server should support HTTP compression (gzip)

2017-07-25 Thread Pierre Quentel
Pierre Quentel added the comment: In the latest version of the Pull Request (https://github.com/python/cpython/pull/2078/commits/6466c93555bec521860c57e832b691fe7f0c6c20) : - compression is disabled by default (compressed_types is set to []) - as suggested by Chris Barker in the discussion

[issue29512] regrtest refleak: implement bisection feature

2017-07-25 Thread Pierre Quentel
Pierre Quentel added the comment: Maybe it's me who is doing things wrong, but when I run Lib/test/test_httpservers.py I get this strange error : Traceback (most recent call last): File "C:\cpython\Lib\test\test_httpservers.py", line 7, in from http.server import BaseHTTPRequ

[issue30576] http.server should support HTTP compression (gzip)

2017-07-22 Thread Pierre Quentel
Pierre Quentel added the comment: Thank you Terry and Victor for your comments. I understand that you agree on adding HTTP compression to http.server, but don't want it to be enabled by default. @terry.reedy With the implementation proposed in the Pull Request, to disable compression

[issue30576] http.server should support HTTP compression (gzip)

2017-07-19 Thread Pierre Quentel
Pierre Quentel added the comment: Is Python-ideas the appropriate place to get input from other core devs ? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30824] Add mimetype for extension .json

2017-07-01 Thread Pierre Quentel
New submission from Pierre Quentel: I propose to add a mapping of file extension .json to mime type "application/json". This is registered in https://www.iana.org/assignments/media-types -- components: Library (Lib) messages: 297494 nosy: quentel, r.david.murray priori

[issue30576] http.server should support HTTP compression (gzip)

2017-06-20 Thread Pierre Quentel
Pierre Quentel added the comment: Thanks for the comments. I agree with some of them, and have improved the PR accordingly, but I don't agree on the opinion that HTTP compression is beyond the scope of http.server : like browser cache (which also implies a negociation between client

[issue30576] http.server should support HTTP compression (gzip)

2017-06-10 Thread Pierre Quentel
Changes by Pierre Quentel <pierre.quen...@gmail.com>: -- pull_requests: +2142 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30576] http.server should support HTTP compression (gzip)

2017-06-10 Thread Pierre Quentel
Pierre Quentel added the comment: The compression is done on the fly : if compression criteria are satisfied, the original content is gzipped, either in memory or on a temporary file on disk, depending on the file size. The gzipped content is not cached, but since the server now supports

[issue30576] http.server should support HTTP compression (gzip)

2017-06-06 Thread Pierre Quentel
Pierre Quentel added the comment: I propose this as a minor improvement to the built-in server, like the support of browser cache that will be included in Python 3.7 (issue #29654, PR #298). I understand that the server is not supposed to be full-featured, but HTTP compression is widespread

[issue30576] http.server should support HTTP compression (gzip)

2017-06-05 Thread Pierre Quentel
Changes by Pierre Quentel <pierre.quen...@gmail.com>: -- type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue30576] http.server should support HTTP compression (gzip)

2017-06-05 Thread Pierre Quentel
New submission from Pierre Quentel: The server in http.server currently doesn't support HTTP compression. I propose to implement it in the method send_head() of SimpleHTTPRequestHandler this way : for each GET request, if the request header "Accept-Encoding" is present and incl

[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-04-11 Thread Pierre Quentel
Pierre Quentel added the comment: Senthil, Can you take a look at the Pull Request when you have time ? The correct PR is #991, not #990. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-04-04 Thread Pierre Quentel
Changes by Pierre Quentel <pierre.quen...@gmail.com>: -- pull_requests: +1163 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-04-04 Thread Pierre Quentel
Changes by Pierre Quentel <pierre.quen...@gmail.com>: -- pull_requests: +1162 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-04-04 Thread Pierre Quentel
New submission from Pierre Quentel: In the cgi module, the parse_multipart() function duplicates code from FieldStorage, and the result is not compliant with that of FieldStorage for requests sent with multipart/form-data : for non-file fields, the value associated with a key is a list

[issue11066] cgi.py proposals : sys.stdout encoding + rewriting of parsing functions

2017-04-04 Thread Pierre Quentel
Pierre Quentel added the comment: I close this issue and will open a more specific one for the rewriting of parse_multipart() -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.pytho

[issue29654] SimpleHTTPRequestHandler should support browser cache

2017-02-25 Thread Pierre Quentel
New submission from Pierre Quentel: SimpleHTTPServer send a Last-Modified response header, but doesn't take into account the If-Modified-Since header if it was sent by the user agent. If a url matches a file and this file was not modified after the value of the If-Modified-Since header

Re: do_POST not working on http.server with python

2016-05-01 Thread Pierre Quentel
Le jeudi 28 avril 2016 10:36:27 UTC+2, Rahul Raghunath a écrit : > 0 > down vote > favorite > > > I'm trying to create a simple http server with basic GET and POST > functionality. The program is supposed to GET requests by printing out a > simple webpage that greets a user and askes how

Re: how to setup for localhost:8000

2016-04-17 Thread Pierre Quentel
> > 127.0.0.1 - - [15/Apr/2016 20:57:32] "GET / HTTP/1.1" 200 - > Hi Pierre, > > When I type http://localhost:8000, I did not see anything in the console > after the line "Serving HTTP on 0.0.0.0 port 8000 ... I believe the way I ran > was not correct as shown below: > > python -m http.server

Re: how to setup for localhost:8000

2016-04-15 Thread Pierre Quentel
Le jeudi 14 avril 2016 22:50:33 UTC+2, wrh...@gmail.com a écrit : > On Thursday, April 14, 2016 at 2:23:36 PM UTC-4, Andrew Farrell wrote: > > What happens when you type > > > > http://localhost:8000 > > > > Into the address bar of your browser as this is running? > > > > On Thu, Apr 14, 2016

Re: Iterators membership testing

2015-08-09 Thread Pierre Quentel
Le dimanche 9 août 2015 11:25:17 UTC+2, Chris Angelico a écrit : On Sun, Aug 9, 2015 at 7:06 PM, Pierre Quentel pierre.quen...@gmail.com wrote: For user-defined classes which do not define __contains__() but do define __iter__(), x in y is true if some value z with x == z is produced while

Re: Iterators membership testing

2015-08-09 Thread Pierre Quentel
The trap you're seeing here is that iterating over an iterator always consumes it, but mentally, you're expecting this to be iterating over a new instance of the same sequence. No, I just tried to apply what I read in the docs : 1. I have y = A(10) which is an instance of a class which does

Iterators membership testing

2015-08-09 Thread Pierre Quentel
The documentation at https://docs.python.org/3.5/reference/expressions.html#not-in says : For user-defined classes which do not define __contains__() but do define __iter__(), x in y is true if some value z with x == z is produced while iterating over y. If an exception is raised during the

[issue24764] cgi.FieldStorage can't parse multipart part headers with Content-Length and no filename in Content-Disposition

2015-08-08 Thread Pierre Quentel
Pierre Quentel added the comment: Victor, you can apply the patch and close the issue. Le 7 août 2015 17:12, Peter Landry rep...@bugs.python.org a écrit : Peter Landry added the comment: A new patch that simply removes Content-Length from part headers when present. -- Added file

[issue24764] cgi.FieldStorage can't parse multipart part headers with Content-Length and no filename in Content-Disposition

2015-08-07 Thread Pierre Quentel
Pierre Quentel added the comment: I don't really see why there is a Content-Length in the headers of a multipart form data. The specification at http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2 doesn't mention it, and it is absent in the example that looks like the one tested

[issue24764] cgi.FieldStorage can't parse multipart part headers with Content-Length and no filename in Content-Disposition

2015-08-01 Thread Pierre Quentel
Pierre Quentel added the comment: Yes, I will be able to review the patch next week 2015-07-31 18:13 GMT+02:00 STINNER Victor rep...@bugs.python.org: STINNER Victor added the comment: @Pierre Quentel: Hi! Are you still working on CGI? Can you please review this patch? Thanks

[ANN] Brython 3.0.0 relased

2014-11-16 Thread Pierre Quentel
Hi, Version 3.0.0 of Brython has been released recently Brython is an implementation of Python 3 running in the browser, with an interface to DOM elements and events. It allows writing web client applications with Python instead of Javascript. Python programs are inserted in the HTML page

Re: Problem with the console on the new python.org site

2014-02-24 Thread Pierre Quentel
Le lundi 24 février 2014 14:19:12 UTC+1, Jean-Michel Pichavant a écrit : - Original Message - On Sun, 23 Feb 2014 10:20:15 -0800, Pierre Quentel wrote: The new home page of python.org is very nice, congratulations ! The best I can say about it is that I'm extremely

Problem with the console on the new python.org site

2014-02-23 Thread Pierre Quentel
The new home page of python.org is very nice, congratulations ! But there is a problem with the online console provided by PythonAnywhere : with my azerty keyboard, I can't enter characters such as ) or ] - very annoying ! It this going to be fixed soon ? - Pierre --

Brython 2.0 (Python in the browser)

2014-02-16 Thread pierre . quentel
Hi, Brython (Browser Python) is an implementation of Python 3 in the browser. Its goal is to be able to write client-side programs in Python instead of Javascript, with code inside tags script type=text/python.../script. As opposed to solutions such as Pyjamas or Py2JS, the translation from

Re: Brython (Python in the browser)

2013-12-27 Thread Pierre Quentel
Le vendredi 27 décembre 2013 15:56:33 UTC+1, jonas.t...@gmail.com a écrit : Den fredagen den 27:e december 2013 kl. 07:14:35 UTC+1 skrev Pierre Quentel: Hi, Ever wanted to use Python instead of Javascript for web client programming ? Take a look at Brython

Re: Brython (Python in the browser)

2013-12-27 Thread Pierre Quentel
Le vendredi 27 décembre 2013 17:12:09 UTC+1, Johannes Schneider a écrit : On 27.12.2013 07:14, Pierre Quentel wrote: Hi, Ever wanted to use Python instead of Javascript for web client programming ? Take a look at Brython, an implementation of Python 3 in the browser

Brython (Python in the browser)

2013-12-26 Thread Pierre Quentel
Hi, Ever wanted to use Python instead of Javascript for web client programming ? Take a look at Brython, an implementation of Python 3 in the browser, with an interface with DOM elements and events Its use is very simple : - load the Javascript library brython.js : script

Re: Brython - Python in the browser

2012-12-22 Thread Pierre Quentel
Oh, and repr is just a synonym of str, which makes it useless. 3 days ago repr was not even implemented at all, so it's a step forward... -- http://mail.python.org/mailman/listinfo/python-list

Re: Brython - Python in the browser

2012-12-22 Thread Pierre Quentel
I was over-simplifying - or, to put is less diplomatically, I screwed up - when I answered that the addition returned a string. As Chris pointed out, it made the explanation very confusing. My apologies The objects handled by + and = can be : - strings, integers, floats - instances of $TagClass

Re: Brython - Python in the browser

2012-12-22 Thread Pierre Quentel
Still, it tends to be a lot harder to explain, document, and read documentation for, something that uses operators weirdly, rather than keyword-searchable method names. You don't explain how to use the Python syntax (for instance the operator %, which behaves very differently between integers

Re: Brython - Python in the browser

2012-12-22 Thread Pierre Quentel
I forgot to mention : list comprehensions and the ternary operator (r1 if cond else r2) are now supported ! - Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
If that's your intention, then instead of coming up with something totally new, unpythonic and ugly, why not take the normal Python route and implement a subset of the ElementTree API? Stefan Because the tree implementation in ElementTree or other tree modules in Python require a lot of

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
Pythonic also means: If the implementation is hard to explain, it's a bad idea. What, exactly, does the sum of a string and a bolded string produce? Can you explain that easily and clearly? Yes : a+b returns the string a+str(b) It is exactly what you get in CPython with class B: ...

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
= is a comparison expression operator, which is completely different. It is just wrong for this usage. I am 99.9% sure you will come to regret it eventually. Better to make the change now than in Brython2 or Brython3. I am 99.99% sure of the contrary, having used this syntax for more than 3

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
Hmm. So when that gets added into a DIV, it has to get parsed for tags? How does this work? This seems very odd. I would have expected it to remain as DOM objects. In DIV(child) : - if child is a string, integer or float, a text node is added (addChild) to the DIV element, with the string

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
The interpreter, though, will be more than happy to treat that as a comparison if the LHS is not the type that you think it is. For example, maybe you've added it to a string at some point, and now it's a string instead of an element. I guess that since doc is made a keyword, that probably

Re: Brython - Python in the browser

2012-12-20 Thread Pierre Quentel
Le jeudi 20 décembre 2012 01:07:15 UTC+1, Terry Reedy a écrit : On 12/19/2012 1:19 PM, Pierre Quentel wrote: The objective of Brython is to replace Javascript by Python as the scripting language for web browsers, making it usable on all terminals including smartphones, tablets

Re: Brython - Python in the browser

2012-12-20 Thread Pierre Quentel
Le jeudi 20 décembre 2012 01:54:44 UTC+1, Ian a écrit : On Wed, Dec 19, 2012 at 5:07 PM, Terry Reedy tjre...@udel.edu wrote: That says that my browser, Firefox 17, does not support HTML5. Golly gee. I don't think any browser support5 all of that moving target, and Gecko apparently

Brython - Python in the browser

2012-12-19 Thread Pierre Quentel
Hi, The objective of Brython is to replace Javascript by Python as the scripting language for web browsers, making it usable on all terminals including smartphones, tablets, connected TVs, etc. Please forgive the lack of ambition ;-) The best introduction is to visit the Brython site

[issue11352] Update cgi module doc

2012-05-10 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: I attach a new version after sharing thought with Glenn CGI scripts are still unable to define which encoding to use to print the strings received from the user agent. A patch was proposed #11066 but the issue is still pending

[issue11352] Update cgi module doc

2012-05-09 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Hi, I started working on a revised version of the whole cgi documentation. I mostly changed paragraphs 2 3 (Using the CGI module and Higher level interface) and replaced them by a paragraph still called Using the CGI module + 2 other

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-08 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Hi Glenn, My proposal was not about optimization, I just thought that if x==y is simpler than if len(x)==len(y) and x==y. Since we don't expect that there will be many directories in the list, I don't think optimizing is so important

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-07 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Thanks for the explanation I still think that the patch can be simplified, not using path lengths and the found flag collapsed_path = _url_collapse_path(self.path) for head in self.cgi_directories: if head==collapsed_path

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-06 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Hi Glenn, good to hear from you ;-) I think the fix can be simplified replacing dir_sep = collapsed_path.find('/', 1) by dir_sep = collapsed_path.rfind('/', 1) -- nosy: +quentel

[issue8077] cgi handling of POSTed files is broken

2012-05-03 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: There are 2 different problems : - handling of data by cgi.FieldStorage (issue 4953) : fixed since version 3.2 - in http.server.CGIHTTPRequestHandler, for POST requests on Windows, before opening the subprocess in run_cgi() all data

[issue8077] cgi handling of POSTed files is broken

2012-05-02 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: -- nosy: +quentel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8077 ___ ___ Python-bugs-list

[issue11352] Update cgi module doc

2012-04-30 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Thanks Hynek for raising this issue from the dead Patch proposal attached. Sorry if there are markup errors, it's my first contact with rst -- Added file: http://bugs.python.org/file25416/cgi.rst

[issue11352] Update cgi module doc

2012-04-30 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Sorry about that. I didn't dare to say I was also a Mercurial newbie -- Added file: http://bugs.python.org/file25421/cgi-doc-update.patch ___ Python tracker rep...@bugs.python.org http

[issue11352] Update cgi module doc

2012-04-30 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file25416/cgi.rst ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11352

[issue11352] Update cgi module doc

2012-04-30 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Thanks Senthil I spot a typo in the first modified paragraph : cet instead of set -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11352

ANN : Karrigell-4.3.6 released

2011-10-31 Thread Pierre Quentel
Hi, A new version of the Karrigell web framework for Python 3.2+ has just been released on http://code.google.com/p/karrigell/ One of the oldest Python web frameworks (the first version was released back in 2002), it now has 2 main versions, one for Python 2 and another one for Python 3. The

[ANN] Karrigell-4.3.6 released

2011-10-31 Thread Pierre Quentel
Hi, A new version of the Karrigell web framework for Python 3.2+ has just been released on http://code.google.com/p/karrigell/ One of the oldest Python web frameworks around (the first version was released back in 2002), it now has 2 main versions, one for Python 2 and another one for Python 3.

Re: Relative seeks on string IO

2011-09-07 Thread Pierre Quentel
Please post code without non-code indents, like so: Sorry about that. After the line Example : I indented the next block, out of habit ;-) What system are you using? Does it have a narrow or wide unicode build? (IE, what is the value of sys.maxunicode?) I use Windows XP Pro, version 2002,

[issue12922] StringIO and seek()

2011-09-07 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: -- nosy: +quentel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12922 ___ ___ Python-bugs-list

Relative seeks on string IO

2011-09-06 Thread Pierre Quentel
Hi, I am wondering why relative seeks fail on string IO in Python 3.2 Example : from io import StringIO txt = StringIO('Favourite Worst Nightmare') txt.seek(8) # no problem with absolute seek but txt.seek(2,1) # 2 characters from current position raises IOError: Can't do

Re: Crazy what-if idea for function/method calling syntax

2011-07-18 Thread Pierre Quentel
On 18 juil, 07:54, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 18 Jul 2011 08:54 am ΤΖΩΤΖΙΟΥ wrote: Jumping in: What if a construct    xx(*args1, **kwargs1)yy(*args2, **kwargs2) was interpreted as   xxyy(*(args1+args2), **(kwargs1+kwargs2)) (Note: with

[issue12411] cgi.parse_multipart is broken on 3.x

2011-07-04 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: When the FieldStorage class was fixed there was a discussion in issue 4953 about the module-level functions parse() and parse_multipart(). The code was very similar to methods of the FieldStorage class so the idea was to use

Karrigell-4.1 : first version of the web framework for Python 3.2

2011-03-28 Thread Pierre Quentel
Hi, Karrigell is a web framework, that was only available for Python 2.x so far (http://www.karrigell.fr) With the cgi module now usable for Python 3 since version 3.2, a first release of Karrigell for Python 3.2 is published and can be downloaded from the project page :

[issue11352] Buf in cgi module doc

2011-02-28 Thread Pierre Quentel
New submission from Pierre Quentel pierre.quen...@gmail.com: Hi, I wrote a patch for the cgi module in version 3.2rc1 (#4953). Small changes should be done to the documentation of this module to reflect the changes in the module API : - in section 20.2.2. Using the cgi module original text

[issue11352] Bug in cgi module doc

2011-02-28 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: bug, not buf... -- title: Buf in cgi module doc - Bug in cgi module doc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11352

[issue10911] cgi: add more tests

2011-02-04 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: I opened issue #11066 for the code refactoring -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10911

[issue10911] cgi: add more tests

2011-01-29 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Here is the diff file for test_cgi.py I added a test for a multipart/form-data form with non ASCII data to test the encoding parameter of FieldStorage -- keywords: +patch Added file: http://bugs.python.org/file20611

[issue11066] cgi.py proposals : sys.stdout encoding + rewriting of parsing functions

2011-01-29 Thread Pierre Quentel
New submission from Pierre Quentel pierre.quen...@gmail.com: Python 3.2rc1 introduced a new version of cgi.py that handles correctly file uploads In this version, the FieldStorage constructor receives an argument encoding which is the encoding used by the document holding the submitted form

  1   2   3   >