Re: Printing a drop down menu for a specific field.

2013-10-21 Thread Νίκος Αλεξόπουλος
Στις 21/10/2013 2:30 πμ, ο/η Νίκος Αλεξόπουλος έγραψε: try: cur.execute( '''SELECT host, city, useros, browser, ref, hits, lastvisit FROM visitors WHERE counterID = (SELECT ID FROM counters WHERE url = %s) ORDER BY lastvisit DESC''', page ) data = cur.fetchall() for row in data:

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Peter Cacioppi
I've written a fair bit of code in pure C, C++, C#, Java and now getting there in Python. The difference between C# and Java is fairly minor. The others have large and significant differences between them. Garbage collectors or not is huge. Exceptions or not is huge. Dynamic or static typing

Re: Printing a drop down menu for a specific field.

2013-10-21 Thread Ben Finney
Νίκος Αλεξόπουλος nikos.gr...@gmail.com writes: Any help would be appreciated. Please stop posting merely for grabbing attention. If someone is going to answer, they'll answer. Don't annoy the forum with pleas for attention. -- \“Program testing can be a very effective way to

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Chris Angelico
On Mon, Oct 21, 2013 at 1:07 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: One of the reasons multiple languages exist is because people find that useful programming idioms and styles are *hard to use* or ugly in some languages, so they create new languages with different

Re: Printing a drop down menu for a specific field.

2013-10-21 Thread Steven D'Aprano
On Mon, 21 Oct 2013 09:07:17 +0300, Νίκος Αλεξόπουλος wrote: for row in data: (host, city, useros, browser, ref, hits, lastvisit) = row lastvisit = lastvisit.strftime('%A %e %b, %H:%M') print( tr ) for item in (host, city, useros, browser, ref, hits,

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Chris Angelico
On Mon, Oct 21, 2013 at 5:44 PM, Peter Cacioppi peter.cacio...@gmail.com wrote: I've written a fair bit of code in pure C, C++, C#, Java and now getting there in Python. The difference between C# and Java is fairly minor. The others have large and significant differences between them.

Re: skipping __init__ and using exploiting a class member instead

2013-10-21 Thread feedthetroll
Am Montag, 21. Oktober 2013 06:31:36 UTC+2 schrieb Peter Cacioppi: That sound you hear is Roy Smith hitting the nail on the head. PLONK: The sound you hear, when a context-less troll is hitting the bottom of my killfile. -- https://mail.python.org/mailman/listinfo/python-list

Animated PNG Vs Gif: 120fr 3D Python Powered Logo

2013-10-21 Thread Metallicow
Discussion: Dear Guido and friends, Noticed this is gaining alot more support lately. http://www.kickstarter.com/projects/374397522/apngasm-foss-animated-png-tools-and-apng-standardi After testing my gif and apng Animated 3D Python Powered Logos... The difference is real obvious at first. apng

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Mark Lawrence
On 21/10/2013 07:44, Peter Cacioppi wrote: I've written a fair bit of code in pure C, C++, C#, Java and now getting there in Python. The difference between C# and Java is fairly minor. The others have large and significant differences between them. Garbage collectors or not is huge.

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Chris Angelico
On Mon, Oct 21, 2013 at 6:27 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 21/10/2013 07:44, Peter Cacioppi wrote: [ a whole lot of stuff ] As my crystal ball is once again being mended, would you please be kind enough to tell all of us who and exactly what you're replying to. Mine is

Re: Printing a drop down menu for a specific field.

2013-10-21 Thread Mark Lawrence
On 21/10/2013 07:07, Νίκος Αλεξόπουλος wrote: Any help would be appreciated. It is considered polite to wait for at least 24 hours before pinging. If waiting for this time isn't an option then paying for support is. -- Python is the second best programming language in the world. But the

Re: Printing a drop down menu for a specific field.

2013-10-21 Thread Νίκος Αλεξόπουλος
Στις 21/10/2013 9:58 πμ, ο/η Steven D'Aprano έγραψε: On Mon, 21 Oct 2013 09:07:17 +0300, Νίκος Αλεξόπουλος wrote: for row in data: (host, city, useros, browser, ref, hits, lastvisit) = row lastvisit = lastvisit.strftime('%A %e %b, %H:%M') print( tr )

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Mark Lawrence
On 21/10/2013 08:31, Chris Angelico wrote: I use Google Groups and it sucks, so I delete all the context because then nobody can see how much it sucks at showing context. Because it's written in (say) C++ in an object orientated style, so by rewriting it using assembler in a procedural style

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Chris Angelico
On Mon, Oct 21, 2013 at 6:39 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 21/10/2013 08:31, Chris Angelico wrote: I use Google Groups and it sucks, so I delete all the context because then nobody can see how much it sucks at showing context. Because it's written in (say) C++ in an

Re: Python Front-end to GCC

2013-10-21 Thread Steven D'Aprano
On Sun, 20 Oct 2013 20:35:03 -0700, Mark Janssen wrote: [Attribution to the original post has been lost] Is a jit implementation of a language (not just python) better than traditional ahead of time compilation. Not at all. The value of jit compilation, I believe, is purely for the dynamic

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Mark Lawrence
On 21/10/2013 08:43, Chris Angelico wrote: On Mon, Oct 21, 2013 at 6:39 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 21/10/2013 08:31, Chris Angelico wrote: I use Google Groups and it sucks, so I delete all the context because then nobody can see how much it sucks at showing context.

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Steven D'Aprano
On Sun, 20 Oct 2013 23:44:27 -0700, Peter Cacioppi wrote: This is just one language feature. I could go on and on. The idea that the differences between these languages is just syntactic sugar and aesthetics is so profoundly misguided that I can only assume that this misconception was

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Metallicow
Python is the Best! -- https://mail.python.org/mailman/listinfo/python-list

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Peter Cacioppi
Specifically the following seems so misguided as to be deliberate trolling. One of the reasons multiple languages exist is because people find that useful programming idioms and styles are *hard to use* or ugly in some languages, so they create new languages with different syntax to make those

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Metallicow
Are you suggesting Advertising is the Best language there is? # After many years, I agree not, but what to may... def If I do Something do, you not react(): IsMySyntaxNotCorrect() CanINotCorrectMyGrammaticalMistakesAndSeekAcceptance(): # The most arguable

Re: Python Front-end to GCC

2013-10-21 Thread Oscar Benjamin
On 21 October 2013 08:46, Steven D'Aprano st...@pearwood.info wrote: On Sun, 20 Oct 2013 20:35:03 -0700, Mark Janssen wrote: [Attribution to the original post has been lost] Is a jit implementation of a language (not just python) better than traditional ahead of time compilation. Not at

Re: Python Front-end to GCC

2013-10-21 Thread Philip Herron
Hey all, Thanks, i've been working on this basically on my own 95% of the compiler is all my code, in my spare time. Its been fairly scary all of this for me. I personally find this as a real source of interest to really demystify compilers and really what Jit compilation really is under the

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread rusi
On Monday, October 21, 2013 2:13:52 PM UTC+5:30, Peter Cacioppi wrote: Specifically the following seems so misguided as to be deliberate trolling. The same could be said for this below… but… One of the reasons multiple languages exist is because people find that useful programming idioms

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Roy Smith
On Mon, Oct 21, 2013 at 1:07 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: One of the reasons multiple languages exist is because people find that useful programming idioms and styles are *hard to use* or ugly in some languages, so they create new languages with different

IDLE being too clever checking nonlocal declarations?

2013-10-21 Thread Chris Angelico
Try typing this into IDLE: def a(): def b(): nonlocal q SyntaxError: no binding for nonlocal 'q' found In interactive command-line Python, this doesn't throw an error, and it works fine if the name is used later: def a(): def b(): nonlocal q q+=1 q=1

Class construction

2013-10-21 Thread Demian Brecht
Hi all, I'm trying to wrap my head around how classes are constructed at the interpreter level (as a side effect of digging into metaclasses) and I'm hoping to have my investigation either validated or ridiculed ;) The pipeline that I've figured through some gdb debugging (starting at

Re: Printing a drop down menu for a specific field.

2013-10-21 Thread Joel Goldstick
On Mon, Oct 21, 2013 at 3:31 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 21/10/2013 07:07, Νίκος Αλεξόπουλος wrote: Any help would be appreciated. It is considered polite to wait for at least 24 hours before pinging. If waiting for this time isn't an option then paying for

Re: IDLE being too clever checking nonlocal declarations?

2013-10-21 Thread Peter Otten
Chris Angelico wrote: Try typing this into IDLE: def a(): def b(): nonlocal q SyntaxError: no binding for nonlocal 'q' found In interactive command-line Python, this doesn't throw an error, and it works fine if the name is used later: def a(): def b():

Re: IDLE being too clever checking nonlocal declarations?

2013-10-21 Thread Chris Angelico
On Tue, Oct 22, 2013 at 3:09 AM, Peter Otten __pete...@web.de wrote: Chris Angelico wrote: But typing this into IDLE interactive mode requires some fiddling around with the editor. Is it trying to be too clever? Am I doing something that makes no sense? Yes, but you should still file a bug

Re: skipping __init__ and using exploiting a class member instead

2013-10-21 Thread Neil Cerutti
On 2013-10-20, Ben Finney ben+pyt...@benfinney.id.au wrote: Roy Smith r...@panix.com writes: Scott Meyers is an incredibly smart C++ wizard. His books are amazing. The fact that it takes somebody that smart, and books that amazing, to teach you how not to shoot yourself in the foot with a

Re: IDLE being too clever checking nonlocal declarations?

2013-10-21 Thread Terry Reedy
On 10/21/2013 11:06 AM, Chris Angelico wrote: Try typing this into IDLE: def a(): def b(): nonlocal q SyntaxError: no binding for nonlocal 'q' found If you submit those three lines to Python from the command line, that is what you see. In interactive command-line Python,

Re: What's wrong with Windows Command Prompt (was Re: Error Testing)

2013-10-21 Thread David Robinow
On Sat, Oct 19, 2013 at 4:35 PM, Terry Reedy tjre...@udel.edu wrote: On 10/19/2013 2:31 PM, Tim Chase wrote: On 2013-10-19 14:08, David Robinow wrote: On Sat, Oct 19, 2013 at 9:01 AM, Chris Angelico wrote: You can try all these out in the interactive interpreter (you probably have IDLE

Re: Python Front-end to GCC

2013-10-21 Thread Mark Janssen
On Mon, Oct 21, 2013 at 12:46 AM, Steven D'Aprano st...@pearwood.info wrote: On Sun, 20 Oct 2013 20:35:03 -0700, Mark Janssen wrote: [Attribution to the original post has been lost] Is a jit implementation of a language (not just python) better than traditional ahead of time compilation.

Re: Python Front-end to GCC

2013-10-21 Thread Mark Janssen
On Mon, Oct 21, 2013 at 4:08 AM, Philip Herron herron.phi...@googlemail.com wrote: Thanks, i've been working on this basically on my own 95% of the compiler is all my code, in my spare time. Its been fairly scary all of this for me. I personally find this as a real source of interest to

Re: What's wrong with Windows Command Prompt (was Re: Error Testing)

2013-10-21 Thread Tim Chase
On 2013-10-21 15:55, David Robinow wrote: I wasn't aware that the interactive interpreter on Linux had features that the Windows version didn't. I'm curious what those features might be. It's mostly the benefits that come from being built with the readline library, meaning you get - command

Re: Python Front-end to GCC

2013-10-21 Thread Ned Batchelder
On 10/21/13 4:14 PM, Mark Janssen wrote: On Mon, Oct 21, 2013 at 12:46 AM, Steven D'Aprano st...@pearwood.info wrote: On Sun, 20 Oct 2013 20:35:03 -0700, Mark Janssen wrote: [Attribution to the original post has been lost] Is a jit implementation of a language (not just python) better than

python -c commands on windows.

2013-10-21 Thread Terry Reedy
Manual says -c command Execute the Python code in command. command can be one or more statements separated by newlines, with significant leading whitespace as in normal module code. In Windows Command Prompt I get: C:\Programs\Python33python -c a=1\nprint(a) File string, line 1

Re: Python Front-end to GCC

2013-10-21 Thread Philip Herron
On Monday, 21 October 2013 21:26:06 UTC+1, zipher wrote: On Mon, Oct 21, 2013 at 4:08 AM, Philip Herron herron.phi...@googlemail.com wrote: Thanks, i've been working on this basically on my own 95% of the compiler is all my code, in my spare time. Its been fairly scary all of this for

Re: python -c commands on windows.

2013-10-21 Thread random832
On Mon, Oct 21, 2013, at 16:47, Terry Reedy wrote: Manual says -c command Execute the Python code in command. command can be one or more statements separated by newlines, with significant leading whitespace as in normal module code. In Windows Command Prompt I get:

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-21 Thread Peter Cacioppi
Just because the CPython implementation does something doesn't mean that thing is something other than risky/tricky/to-be-avoided-if-possible. Python (and it's implementations) exist so that ordinary people can avoid doing risky stuff. I'm not critiquing the CPython implementation here, I'm

Re: python -c commands on windows.

2013-10-21 Thread Chris Angelico
On Tue, Oct 22, 2013 at 8:14 AM, random...@fastmail.us wrote: C:\python -c a=1^ More? More? print(a) 1 Note that you have to hit enter *twice* for this to work. (I'm not sure why; the caret is supposed to escape the newline, but that doesn't explain this. For all I know, it could be an

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-21 Thread Mark Lawrence
On 17/10/2013 00:36, Skybuck Flying wrote: Unfortunately python does not have labels and goto statements as far as I know http://entrian.com/goto/ -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence --

Re: python -c commands on windows.

2013-10-21 Thread Ned Batchelder
On 10/21/13 4:47 PM, Terry Reedy wrote: Manual says -c command Execute the Python code in command. command can be one or more statements separated by newlines, with significant leading whitespace as in normal module code. In Windows Command Prompt I get: C:\Programs\Python33python -c

Re: python -c commands on windows.

2013-10-21 Thread Terry Reedy
On 10/21/2013 5:14 PM, random...@fastmail.us wrote: On Mon, Oct 21, 2013, at 16:47, Terry Reedy wrote: Manual says -c command Execute the Python code in command. command can be one or more statements separated by newlines, with significant leading whitespace as in normal module code. In

Re: Class construction

2013-10-21 Thread Marcin Szamotulski
You can inspect the process in this way: c = 'class A: pass' code = compile(c, 'stdin', 'exec') from dis import dis dis(code) 1 0 LOAD_BUILD_CLASS 1 LOAD_CONST 0 (code object A at 0x7effeef1c300, file stdin, line 1) 4 LOAD_CONST

Re: Python Front-end to GCC

2013-10-21 Thread Mark Janssen
No its not like those 'compilers' i dont really agree with a compiler generating C/C++ and saying its producing native code. I dont really believe its truely within the statement. Compilers that do that tend to put in alot of type saftey code and debugging internals at a high level to get

Re: how to get current max_heap_size value of minimark in pypy 2.x

2013-10-21 Thread Steven D'Aprano
Hi Ricky, On Sun, 20 Oct 2013 19:53:18 -0700, roadhome wrote: I read some articles about setting PYPY_GC_MAX environment variable. But I can't find how to get current max_heap_size value of minimark. Unfortunately it seems that not a lot of people here have enough experience with PyPy to

Re: Python Front-end to GCC

2013-10-21 Thread Steven D'Aprano
On Mon, 21 Oct 2013 10:55:10 +0100, Oscar Benjamin wrote: On 21 October 2013 08:46, Steven D'Aprano st...@pearwood.info wrote: On the contrary, you have that backwards. An optimizing JIT compiler can often produce much more efficient, heavily optimized code than a static AOT compiler, and at

Re: IDLE being too clever checking nonlocal declarations?

2013-10-21 Thread Steven D'Aprano
On Mon, 21 Oct 2013 15:51:56 -0400, Terry Reedy wrote: On 10/21/2013 11:06 AM, Chris Angelico wrote: Try typing this into IDLE: def a(): def b(): nonlocal q SyntaxError: no binding for nonlocal 'q' found If you submit those three lines to Python from the command line, that

Using with context handler, and catching specific exception?

2013-10-21 Thread Victor Hooi
Hi, I suspect I'm holding How should I use the with context handler as well as handling specific exceptions? For example, for a file: with open('somefile.log', 'wb') as f: f.write(hello there) How could I specifically catch IOError in the above, and handle that? Should I wrap

Re: Using with context handler, and catching specific exception?

2013-10-21 Thread MRAB
On 22/10/2013 02:43, Victor Hooi wrote: Hi, I suspect I'm holding How should I use the with context handler as well as handling specific exceptions? For example, for a file: with open('somefile.log', 'wb') as f: f.write(hello there) How could I specifically catch IOError in

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Steven D'Aprano
On Mon, 21 Oct 2013 01:43:52 -0700, Peter Cacioppi wrote: Specifically the following seems so misguided as to be deliberate trolling. One of the reasons multiple languages exist is because people find that useful programming idioms and styles are *hard to use* or ugly in some languages, so

Re: Using with context handler, and catching specific exception?

2013-10-21 Thread Steven D'Aprano
On Mon, 21 Oct 2013 18:43:39 -0700, Victor Hooi wrote: try: with open('somefile.log', 'wb' as f: f.write(hello there) except IOError as e: logger.error(Uhoh, the file wasn't there). I hope that this isn't what you are actually doing. IOError is not just

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread Peter Cacioppi
but it's ugly, by which I mean it is hard to use, error prone, and not easily maintained. OK, I see the problem. What you call ugly is really just objectively bad. Ugliness and beauty are subjective qualities that can't really be debated on a deep level. Like I mentioned in other post, I find

Re: Using with context handler, and catching specific exception?

2013-10-21 Thread Ben Finney
Victor Hooi victorh...@gmail.com writes: try: with open('somefile.log', 'wb' as f: f.write(hello there) except IOError as e: logger.error(Uhoh, the file wasn't there). IOError, as Steven D'Aprano points out, is not equivalent to “file not found”. Also,

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-21 Thread rusi
On Tuesday, October 22, 2013 8:25:58 AM UTC+5:30, Peter Cacioppi wrote: Guess-who said: but it's ugly, by which I mean it is hard to use, error prone, and not easily maintained. OK, I see the problem. What you call ugly is really just objectively bad. You continue to not attribute quotes.

Re: IDLE being too clever checking nonlocal declarations?

2013-10-21 Thread Terry Reedy
On 10/21/2013 7:52 PM, Steven D'Aprano wrote: On Mon, 21 Oct 2013 15:51:56 -0400, Terry Reedy wrote: On 10/21/2013 11:06 AM, Chris Angelico wrote: Try typing this into IDLE: def a(): def b(): nonlocal q SyntaxError: no binding for nonlocal 'q' found If you submit those

Re: Using with context handler, and catching specific exception?

2013-10-21 Thread Victor Hooi
Hi, Thanks for the replies =). Aha, good point about IOError encapsulating other things, I'll use FileNotFoundError, and also add in some other except blocks for the other ones. And yes, I didn't use the exception object in my sample - I just sort. I'd probably be doing something like this.

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-21 Thread Dave Angel
On 21/10/2013 17:19, Peter Cacioppi wrote: Just because the CPython implementation does something doesn't mean If you're going to drop messages in here with no context, you'd be better off just putting it in a bottle and tossing it into the sea. Include a quote from whomever you're responding

Re: Python Front-end to GCC

2013-10-21 Thread rusi
On Tuesday, October 22, 2013 1:59:36 AM UTC+5:30, Ned Batchelder wrote: On 10/21/13 4:14 PM, Mark Janssen wrote: On Mon, Oct 21, 2013 at 12:46 AM, Steven D'Aprano wrote: An optimizing JIT compiler can often produce much more efficient, heavily optimized code than a static AOT compiler,

Re: Python Front-end to GCC

2013-10-21 Thread Piet van Oostrum
Mark Janssen dreamingforw...@gmail.com writes: No its not like those 'compilers' i dont really agree with a compiler generating C/C++ and saying its producing native code. I dont really believe its truely within the statement. Compilers that do that tend to put in alot of type saftey code

Re: Using with context handler, and catching specific exception?

2013-10-21 Thread Ben Finney
Victor Hooi victorh...@gmail.com writes: Aha, good point about IOError encapsulating other things, I'll use FileNotFoundError, and also add in some other except blocks for the other ones. Or not; you can catch OSError, which is the parent of FileNotFoundError

Re: Receive packet using socket

2013-10-21 Thread john pierce
Tom wrote: BTW what I am trying to accomplish is easily done in hping3 using this comm= and: hping3 mtalk.google.com -S -p 5228=20 I just want those same kind of results using python so I can make an exe ou= t of it. Hi Tom, Not sure if it's exactly what you're looking for, but I wrote a tcp

Re: Python Front-end to GCC

2013-10-21 Thread Mark Janssen
A language specification in BNF is just syntax. It doesn't say anything about semantics. So how could this be used to produce executable C code for a program? BNF is used to produce parsers. But a parser isn't sufficient. A C program is just syntax also. How does the compiler generate

Re: Python Front-end to GCC

2013-10-21 Thread Dave Angel
On 22/10/2013 00:24, Mark Janssen wrote: A language specification in BNF is just syntax. It doesn't say anything about semantics. So how could this be used to produce executable C code for a program? BNF is used to produce parsers. But a parser isn't sufficient. A C program is just syntax

Re: Python Front-end to GCC

2013-10-21 Thread Steven D'Aprano
On Mon, 21 Oct 2013 21:24:38 -0700, Mark Janssen wrote: A language specification in BNF is just syntax. It doesn't say anything about semantics. So how could this be used to produce executable C code for a program? BNF is used to produce parsers. But a parser isn't sufficient. A C program

Re: Animated PNG Vs Gif: 120fr 3D Python Powered Logo

2013-10-21 Thread Metallicow
Here is links to the apng/gif on ImageShack uploaded with the Do Not Resize option. Checked/Views fine with default Firefox/Opera browsers. Animated 3D Python Powered Logo apng - 120frames 1/60 sec http://img34.imageshack.us/img34/4717/f4l4.png gif - 120frames about 1/10sec or as fast as it can

[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Georg Brandl
Georg Brandl added the comment: Hi Chris, your commit is a bit hard to review due to all the unrelated spacing changes. I assume this is done automatically by your editor? It's probably best to switch off that feature for CPython development :) --

[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Georg Brandl
Georg Brandl added the comment: While reviewing: is it intended that the filter is only called for directories and not for individual files? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19274

[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2d39b3555951 by Georg Brandl in branch 'default': #19274: use captured_stdout() in the test suite; add NEWS entry. http://hg.python.org/cpython/rev/2d39b3555951 -- ___ Python tracker

[issue19323] typo in statistics documentation

2013-10-21 Thread Michael Merickel
New submission from Michael Merickel: http://docs.python.org/dev/library/statistics.html#mean describes the mean as effected by outliers, when it should say affected. -- assignee: docs@python components: Documentation messages: 200704 nosy: docs@python, mmerickel priority: normal

[issue19323] typo in statistics documentation

2013-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1f466354a85b by Georg Brandl in branch 'default': Closes #19323: fix typo. Thanks to Michael Merickel. http://hg.python.org/cpython/rev/1f466354a85b -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open -

[issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3

2013-10-21 Thread David Coles
David Coles added the comment: And here's the patch for Python 2.7. The result of testing is as follows: - python (default) against py2-linked gdb: All tests pass - python (2.7) against py2-linked gdb: `test_long` fails. - python (default) against py3-linked gdb: All tests pass - python (2.7)

[issue19320] Tkinter tests ran with wantobjects is false

2013-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which follows second way. -- keywords: +patch Added file: http://bugs.python.org/file32274/test_tcl_wantobjects.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19320

[issue19320] Tkinter tests ran with wantobjects is false

2013-10-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19320 ___

[issue19270] sched.cancel() breaks events order

2013-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the order of events with the same time and priority doesn't matter, we can optimize the queue property more than 10 times by using sort() (see cancel_4.patch in issue13451). -- ___ Python tracker

[issue19321] memoryview should be a context manager

2013-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And thank you Antoine for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19321 ___ ___

[issue19321] memoryview should be a context manager

2013-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, it was not only proposed, but it was also implemented (by Antoine). Oh, sorry for the noise. -- resolution: - out of date stage: needs patch - committed/rejected status: open - closed ___ Python tracker

[issue19270] sched.cancel() breaks events order

2013-10-21 Thread STINNER Victor
STINNER Victor added the comment: That is allowed. We make no stability guarantees. Plus it just makes sense that events with the same time and priority are non-deterministic. It would be nice to keep the insertion order. If it is not guaranteed, it must be well documented (big red

[issue19306] Warn unsuspecting readers that thread stacks are in reverse order

2013-10-21 Thread STINNER Victor
STINNER Victor added the comment: Thanks. (most recent call first) was already present in some cases, but I forgot to mention it in all cases. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19306

[issue19293] test_asyncio hanging for 1 hour

2013-10-21 Thread STINNER Victor
STINNER Victor added the comment: 2013/10/21 David Edelsohn rep...@bugs.python.org: I added many tests when I added this feature to Python: see test_signal.py. By the way, it uses select.select() :-) Does test_signal pass successfully on AIX? @haypo: test_signal skips some tests on AIX.

[issue19270] sched.cancel() breaks events order

2013-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does it occur frequently to schedule two events at exactly the same time? On Linux, clocks have a good precision, even time.monotonic(). It depends how you calculate your timestamps, I'd say :-) It's unlikely for two calls to time.time() to give the exact

[issue19270] sched.cancel() breaks events order

2013-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: ... for two calls to time.time() to give the exact same outcome sched now uses time.monotonic() since Python 3.3. This seems quite irrelevant: len(set(time.monotonic() for i in range(100))) 100 -- ___

[issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3

2013-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've added a review comment to the 3.3 version of the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19308 ___

[issue19270] sched.cancel() breaks events order

2013-10-21 Thread STINNER Victor
STINNER Victor added the comment: ... for two calls to time.time() to give the exact same outcome sched now uses time.monotonic() since Python 3.3. In Python 2.7, there is no default timer, but I get that users pick time.time(). (Oh, sched has no unit test in Python 2.7.) --

[issue11698] Improve repr for structseq objects to show named, but unindexed fields

2013-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm, does anyone have an opinion for or against the proposed representation in Sunny's patch? Sunny, if you haven't done so, could you sign a contributor's agreement? http://www.python.org/psf/contrib/ Thanks! --

[issue19270] sched.cancel() breaks events order

2013-10-21 Thread STINNER Victor
STINNER Victor added the comment: Victor: On Windows, the precision of time.monotonic() is worse (around 16 ms), so two events at the same time is more likely. Antoine: This seems quite irrelevant: I would be interested of the same test on Windows. --

[issue19293] test_asyncio hanging for 1 hour

2013-10-21 Thread Charles-François Natali
Charles-François Natali added the comment: I'm completely lost: how many issues is this thread conflating? For example, David, I think you said that my patch regarding signal handling did fix some tests. Is that still the case? If yes, could you open a specific issue for the remaining failing

[issue19205] Don't import re and sysconfig in site.py

2013-10-21 Thread Christian Heimes
Christian Heimes added the comment: The imports in _osx_support counteract the performance boost. I neither have an OS X machine and nor do I understand the internals of _osx_support. Perhaps somebody else likes to work on the module. -- assignee: christian.heimes - components:

[issue18528] Possible fd leak in socketmodule

2013-10-21 Thread Christian Heimes
Christian Heimes added the comment: Shall I commit my patch or shall I close the coverity issue as intentionally? -- versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18528

[issue18650] intermittent test_pydoc failure on 3.4.0a1

2013-10-21 Thread Esa Peuha
Esa Peuha added the comment: The problem seems to be /Users/pyi/Library/Python/3.4/lib/python/site-packages/setuptools-0.9.8-py3.4.egg according to the error page. What is that file? The fact that the second run of the test succeeds implies that it could be a temporary file which is no

[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-10-21 Thread Christian Heimes
Christian Heimes added the comment: Yes, it's a security issue. But the patch would changes the behavior of the function. The current function conforms to RFC 2818. The patch implements RFC 6125, which is more restrictive. -- nosy: +georg.brandl, larry priority: normal - release

[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-10-21 Thread Christian Heimes
Christian Heimes added the comment: Victor, is here anything left to do? -- assignee: - haypo stage: - commit review status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15893

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread koobs
koobs added the comment: @Ethan, not sure if you've already seen them, but there are 4 pydoc failures since 2f09a6980e1a Attaching another complete log from build #245 on the koobs-freebsd9 buildslave here for posterity -- Added file:

[issue19324] Expose Linux-specific APIs in resource module

2013-10-21 Thread Christian Heimes
New submission from Christian Heimes: See #16595 and http://mail.python.org/pipermail/python-ideas/2012-June/015323.html I'm going to add the extra constants before beta. RLIMIT_MSGQUEUE RLIMIT_NICE RLIMIT_RTPRIO RLIMIT_RTTIME RLIMIT_SIGPENDING -- assignee: christian.heimes messages:

[issue18550] internal_setblocking() doesn't check return value of fcntl()

2013-10-21 Thread Christian Heimes
Christian Heimes added the comment: LGTM The patch silences the coverity warnings, too. Does anybody else like to do a code review? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18550

[issue17276] HMAC: deprecate default hash

2013-10-21 Thread Christian Heimes
Christian Heimes added the comment: GPS, what do you suggest instead? Do you want me to remove the deprecation warning? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17276 ___

[issue18775] name attribute for HMAC

2013-10-21 Thread Christian Heimes
Christian Heimes added the comment: I'm going to commit the patch this week. Speak now or forever hold your peace... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18775 ___

[issue19324] Expose Linux-specific APIs in resource module

2013-10-21 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19324 ___ ___

[issue19205] Don't import re and sysconfig in site.py

2013-10-21 Thread STINNER Victor
STINNER Victor added the comment: The imports in _osx_support counteract the performance boost. I neither have an OS X machine and nor do I understand the internals of _osx_support. Perhaps somebody else likes to work on the module. Please open a separated issue for OS X, this issue can

  1   2   3   >