[issue14943] winreg OpenKey doesn't work as documented

2012-05-28 Thread Glenn Linderman
New submission from Glenn Linderman : My first time to use winreg and I am sure that some of this report is documentation, but depending on behavior in other versions, maybe it is a regression in code as well, but I doubt it. I'm reading the 3.3 documentation, but using 3.2.3 for te

[issue15016] Add special case for latin messages in email.mime.text

2012-06-23 Thread Glenn Linderman
Glenn Linderman added the comment: Patch is interesting, using an encoder to detect validity. However, it suffers from some performance problems for long text that has large ASCII prefixes. This seems to be an enhancement sort of request rather than a bug... so I wonder why Python 3.2 is

[issue15226] max( str ) should be fast with PEP 393

2012-06-29 Thread Glenn Linderman
New submission from Glenn Linderman : This is stupid code, but it should be faster with PEP 393 than before, should it not? str = ' ' * 500 + "this is really a string examplewow!!!"; for ix in range( 9000 ): z = max(str) print("Max character: " + m

[issue15226] max( str ) should be fast with PEP 393

2012-06-29 Thread Glenn Linderman
Glenn Linderman added the comment: Ah, so then it would require a new API to make the Python code as smart as the C code, max is too general. Issue 15016 is an example of Python code that could benefit from knowing in constant time if the string contained only characters < 128, or if

[issue15226] max( str ) should be fast with PEP 393

2012-06-29 Thread Glenn Linderman
Changes by Glenn Linderman : -- type: -> enhancement ___ Python tracker <http://bugs.python.org/issue15226> ___ ___ Python-bugs-list mailing list Unsubscri

[issue1602] windows console doesn't print or input Unicode

2012-07-02 Thread Glenn Linderman
Glenn Linderman added the comment: For the win_console.patch, it seems like adding the line self.errors='strict' inside UnicodeOutput.__init__ resolves the problem with input causing exceptions. Not sure if the sys_write_stdout.patch has the same sort of problem. Sure home this i

[issue1602] windows console doesn't print or input Unicode

2012-07-02 Thread Glenn Linderman
Glenn Linderman added the comment: My fix for this "errors" error, might be similar to what is needed for issue 12967, although I don't know if my fix is really correct... just that it gets past the error, and 'strict' is the default for TextIOWrapper. I'm no

[issue1602] windows console doesn't print or input Unicode

2012-07-03 Thread Glenn Linderman
Glenn Linderman added the comment: Terry said: Is unicode3.py something to run once or import in each app that wants unicode output? I say: The latter... import it. Terry said: Either way, if it is possible to fix the console, why is it not distribute it with the fix? I say: Not sure what

[issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute

2012-07-03 Thread Glenn Linderman
Glenn Linderman added the comment: So this looks like it might be a simple fix... in issue 1602, there was a patch for Windows console for 3.1... sadly not applied then, or 3.2, or 3.3 (yet). But in 3.2, the fix sprouted a failure just like this one: the console output class would get

[issue15258] argparse documentation: Improve optparse section regarding allow_interspersed_args

2012-07-06 Thread Glenn Linderman
Glenn Linderman added the comment: See also issue 14191, which describes the problems of trying to make argparse achieve the goal of the default optparse handling of allow_interspersed_args ! The documentation for that branch of the feature is also seriously incomplete, and the workaround is

[issue14191] argparse: nargs='*' doesn't get out-of-order positional parameters

2012-07-06 Thread Glenn Linderman
Glenn Linderman added the comment: See also issue 15258 which points out issues with the converse case. Further testing and development also discovered that in certain error cases, the help message produced by t18-equivalent code was incorrect. t18a.py is an update/rewrite (same concepts

[issue14191] argparse doesn't allow optionals within positionals

2012-07-22 Thread Glenn Linderman
Glenn Linderman added the comment: So my t18a.py wraps Argparse, because the externals are documented and I could understand that. Given enough time, I might be able to understand the internals too... it is just Python... Seems like the internals separate positionals and optionals into two

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

2012-08-04 Thread Glenn Linderman
Glenn Linderman added the comment: Thanks for the patch, Oscar, I've not had more time to follow up on this issue, and haven't yet learned how to generate the patches. While you dropped the "return False" line, which surprised me, the implicit "return None" is

[issue15564] cgi.FieldStorage should not call read_multi on files

2012-08-10 Thread Glenn Linderman
Changes by Glenn Linderman : -- nosy: +v+python ___ Python tracker <http://bugs.python.org/issue15564> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15564] cgi.FieldStorage should not call read_multi on files

2012-08-10 Thread Glenn Linderman
Glenn Linderman added the comment: So the issue you perceive is that a correctly MIME-typed .mht file has a MIME type of multipart/related -- but that for the purposes of uploading the file, you don't want to treat it as that MIME type, but rather as an opaque data file. Just give

[issue15564] cgi.FieldStorage should not call read_multi on files

2012-08-11 Thread Glenn Linderman
Glenn Linderman added the comment: I didn't call the current behaviour of browsers in assigning MIME types automatically based on file extension a bug; I would consider it more of a missing capability, an oversight due to the rareness of attempts to upload MHTML files. This is similar t

[issue15564] cgi.FieldStorage should not call read_multi on files

2012-08-11 Thread Glenn Linderman
Glenn Linderman added the comment: I forgot to mention that the file you provided in your test doesn't look like a well-formed MHTML file, and so an exception would be expected in this case. -- ___ Python tracker <http://bugs.python.org/is

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Glenn Linderman
Glenn Linderman added the comment: Another idea would be to make a notation that looks exactly* like doctests for documentation purposes, but that doctest would not run. Then, non-runnable doctests could be skipped, and runnable ones could be run. This would help keep the runnable code in

[issue16074] bad error in rename

2012-09-28 Thread Glenn Linderman
New submission from Glenn Linderman: I've been using 3.3.0b1 for development, with mostly no problems, but today I was surprised and confused by an error message. It is an attempt to be an improvement over 3.2, giving the filename that os.rename cannot find... but instead, it gives the o

[issue16074] bad error message in os.rename

2012-09-28 Thread Glenn Linderman
Glenn Linderman added the comment: Terry, I thought the test case would demonstrate the error details. As far as Windows, I encountered it there, and it seemed like the sort of error that could be in a Windows-specific module. Serhiy, thanks for confirming, and analyzing. At this point in the

[issue1191964] asynchronous Subprocess

2014-03-31 Thread Glenn Linderman
Changes by Glenn Linderman : -- nosy: +v+python ___ Python tracker <http://bugs.python.org/issue1191964> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21666] Argparse exceptions should include which argument has a problem

2014-06-04 Thread Glenn Linderman
New submission from Glenn Linderman: I coded up a new program, with a bunch of options, and got the following traceback when I tried to run it: Traceback (most recent call last): File "D:\my\py\renmany.py", line 273, in args = cmdl.parse_intermixed_args() File "D:\m

[issue21666] Argparse exceptions should include which argument has a problem

2014-06-04 Thread Glenn Linderman
Changes by Glenn Linderman : -- type: -> enhancement ___ Python tracker <http://bugs.python.org/issue21666> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue21666] Argparse exceptions should include which argument has a problem

2014-06-07 Thread Glenn Linderman
Glenn Linderman added the comment: Yes, I hope someday the parse_intermixed_args patch can be released... but I know it is not relevant to this issue. I was aware of the %(substitution_variables) in the default help formatter, but I (1) goofed and entered % without escaping it (2) was

[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

2012-12-04 Thread Glenn Linderman
Changes by Glenn Linderman : -- nosy: +v+python ___ Python tracker <http://bugs.python.org/issue16612> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16810] inconsistency in weekday

2012-12-28 Thread Glenn Linderman
New submission from Glenn Linderman: Docs say: date.timetuple() Return a time.struct_time such as returned by time.localtime(). The hours, minutes and seconds are 0, and the DST flag is -1. d.timetuple() is equivalent to time.struct_time((d.year, d.month, d.day, 0, 0, 0, d.weekday

[issue16810] inconsistency in weekday

2012-12-29 Thread Glenn Linderman
Glenn Linderman added the comment: Thanks for the response, Serhiy. I misreported, but there is still a bug in this area, it seems. Attached is some code. I was printing out (too) many values from datetime to learn how it worked. I got confused on which ones were printed in which order. The

[issue16810] inconsistency in weekday

2012-12-29 Thread Glenn Linderman
Changes by Glenn Linderman : -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue16810> ___ ___ Python-bugs-

[issue17083] can't specify newline string for readline for binary files

2013-02-01 Thread Glenn Linderman
Glenn Linderman added the comment: I think Bryant's request is reasonable, for consistency in functionality. If line oriented operations are allowed on binary files, then a binary newline value should be permitted at the time of open. I think, for handling binary files, that it would al

[issue1602] windows console doesn't print or input Unicode

2013-09-14 Thread Glenn Linderman
Glenn Linderman added the comment: Hi Drekin. Thanks for your work in progressing this issue. There have been a variety of techniques proposed for this issue, but it sounds like yours has built on what the others learned, and is close to complete, together with issue 17620. Is this in a form

[issue1602] windows console doesn't print or input Unicode

2014-07-25 Thread Glenn Linderman
Glenn Linderman added the comment: This bug deserves to stay open with its high priority (for whatever good that does these last seven years, although I appreciate all the efforts put forth, and have been making heavy use of the workarounds in the patches), because when working with Unicode

[issue1602] windows console doesn't print or input Unicode

2014-08-02 Thread Glenn Linderman
Glenn Linderman added the comment: Mark, the /U and /A switches to CMD only affect (as the help messages say) the output of internal CMD commands. So they would only affect interoperability between internal command output piped to a Python program. The biggest issue in this bug, however, is

[issue1602] windows console doesn't print utf8 (Py30a2)

2009-10-24 Thread Glenn Linderman
Glenn Linderman added the comment: With Python 3.1.1, the following batch file seems to be necessary to use UTF-8 successfully from an XP console: set PYTHONIOENCODING=UTF-8 cmd /u /k chcp 65001 set PYTHONIOENCODING= exit the cmd line seems to be necessary because of Windows having

[issue1602] windows console doesn't print utf8 (Py30a2)

2009-10-26 Thread Glenn Linderman
Glenn Linderman added the comment: The choice of the Lucida Consola or the Consolas font cures most of the rectangle problems. Those are just a limitation of the selected font for the console window. -- ___ Python tracker <http://bugs.python.

[issue7311] Bug on regexp of HTMLParser

2009-11-19 Thread Glenn Linderman
Glenn Linderman added the comment: Re: the BTW -- < and > should be entity-escaped when used in attribute values inside tag attributes... (but are probably seldom found as part of tag attribute values) But the example you showed is not an attribute in a tag, but rather text within a pair

[issue29059] Windows: Python not using ANSI compatible console

2016-12-30 Thread Glenn Linderman
Glenn Linderman added the comment: Nice idea, but not by default. An easy way to switch back and forth, and to be sure the original mode is restored on process exit would be a win. Most windows users want a real GUI, not curses, but compatibility with VT escape codes for cross-platform semi

[issue29059] Windows: Python not using ANSI compatible console

2016-12-30 Thread Glenn Linderman
Glenn Linderman added the comment: Re: curses... maybe that becomes a DOCS issue, to mention the available packages. But it would be easier, no doubt to port curses to a known existing escape sequence control set, than to use a bunch arcane, foreign-to-the-Unix-porter-that-wants-curses

[issue14191] argparse doesn't allow optionals within positionals

2013-04-18 Thread Glenn Linderman
Glenn Linderman added the comment: Paul, your comments are interesting, but your proposed patch doesn't actually solve the problem. So here I am typing away at my command prompt, and I type in a couple optional parameters I know I'll need and start on the sequence of positional

[issue14191] argparse doesn't allow optionals within positionals

2013-04-18 Thread Glenn Linderman
Glenn Linderman added the comment: I should clarify, before someone jumps in: some particular applications do implement restrictions on order of optional and positional arguments; I'm aware of that. getopt easily supported application defined order restrictions, because it processed argu

[issue15427] Describe use of args parameter of argparse.ArgumentParser.parse_args

2013-04-18 Thread Glenn Linderman
Glenn Linderman added the comment: These docs changes seem reasonable, from a side-by-side view (I didn't attempt to look at the formatted results of applying the patch), to better document the current behavior. -- nosy: +v+python ___ P

[issue14191] argparse doesn't allow optionals within positionals

2013-04-18 Thread Glenn Linderman
Glenn Linderman added the comment: Docs look good as mentioned there, for the current behavior, although it would be good to improve the behavior. Note that I have supplied a wrapper (t18a.py) (if it hasn't bit-rotted for 3.4, I'm still using 3.3) that provides the needed function

[issue14191] argparse doesn't allow optionals within positionals

2013-04-23 Thread Glenn Linderman
Glenn Linderman added the comment: Very nice, Paul. I tested that with some of my applications, and some of my test cases. All of them initially failed, because you have parse_intermixed_args returning parameters like parse_known_args instead of like parse_args. Now I can understand that

[issue14191] argparse doesn't allow optionals within positionals

2013-04-23 Thread Glenn Linderman
Glenn Linderman added the comment: Yes, a second function would give more flexibility. Due to the "approval" in msg166175 to use the name parse_intermixed_args for the functionality described there, it would probably be best to use that name for that functionality. So then we are l

[issue14191] argparse doesn't allow optionals within positionals

2013-05-07 Thread Glenn Linderman
Glenn Linderman added the comment: Paul, thanks for your continued work. I had reworked your prior patch into a subclass of Argument Parser, and tweaking the code to get parse_intermixed_args to adjust the behaviors I had reported. Now substituting exactly your more flexible new code into my

[issue14191] argparse doesn't allow optionals within positionals

2013-05-10 Thread Glenn Linderman
Glenn Linderman added the comment: paul j3: Regarding earlier versions of these files - I do not see a way of deleting them. Click on edit, then there is an option to unlink. I don't know if they ever actually get deleted, but it clears out the clutter when looking for the latest ve

[issue14191] argparse doesn't allow optionals within positionals

2013-05-11 Thread Glenn Linderman
Glenn Linderman added the comment: OK, I've been running with the new code most the day, and it seems functional in my testing. I only "sort of" follow your discussion about the "custom action class" caveat, probably because I haven't used "custom action cl

[issue1602] windows console doesn't print or input Unicode

2015-01-02 Thread Glenn Linderman
Glenn Linderman added the comment: Just to note that another side effect of this bug is that stepping through code where the source contains non-ASCII characters results in pdb producing an error when trying to print the source lines. This makes stepping through such source code impossible

[issue14565] Allow multilevel subdirectories in cgi_directories

2015-10-02 Thread Glenn Linderman
Glenn Linderman added the comment: Martin, thanks for the recent activity in this area. Sorry I've not yet learned how to submit patches. python_dev keeps busy changing the process and tools, and I keep busy with other projects, having patched a version of http-server well enough f

<    1   2   3