Course Python for Scientists and Engineers in Chicago

2012-01-24 Thread Mike Müller
Course Python for Scientists and Engineers in Chicago === There will be a comprehensive Python course for scientists and engineers in Chicago end of February / beginning of March 2012. It consists of a 3-day intro and a 2-day advanced section.

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-24 Thread Chris Angelico
On Tue, Jan 24, 2012 at 5:44 PM, alex23 wuwe...@gmail.com wrote: On Jan 24, 4:56 am, 8 Dihedral dihedral88...@googlemail.com wrote: I know manny python programmers just abandon the list comprehension in non-trivial processes. Really? Observation of the python mailing list indicates the

Re: String interning in Python 3 - missing or moved?

2012-01-24 Thread Stefan Behnel
Chris Angelico, 24.01.2012 05:47: Lua and Pike both quite happily solved hash collision attacks in their interning of strings by randomizing the hash used, because there's no way to rely on it. Presumably (based on the intern() docs) Python can do the same, if you explicitly intern your

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Jérôme
Mon, 23 Jan 2012 21:57:16 -0800 (PST) Rick Johnson a écrit: Pretty is the most ludicrous of them all! As you will see, pretty is used superfluously, over and over again! In fact, you could safely omit pretty without sacrificing any meaning of most all the sentences that include the word

Re: Parsing a serial stream too slowly

2012-01-24 Thread Cameron Simpson
On 24Jan2012 05:08, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: | On Tue, 24 Jan 2012 10:49:41 +1100, Cameron Simpson wrote: | | | def OnSerialRead(self, event): | | text = event.data | | self.sensorabuffer = self.sensorabuffer + text | | self.sensorbbuffer =

Re: [GENERAL] [RFE] auto ORDER BY for SELECT

2012-01-24 Thread Chris Angelico
On Mon, Jan 23, 2012 at 11:17 PM, Douglas Eric sekk...@hotmail.com wrote: I suggest to change this behavior. If one makes a SELECT statement without any ORDER BY, it would be clever to automatically sort by the first primary key found in the query, if any. The present behavior would still be

Re: [GENERAL] [RFE] auto ORDER BY for SELECT

2012-01-24 Thread Chris Angelico
Whoops. Wrong list. *sigh* At least there's some variety - it's not Savoynet this time. Disregard the mad guy in the corner, he's not saying anything useful anyway... ChrisA On Tue, Jan 24, 2012 at 7:29 PM, Chris Angelico ros...@gmail.com wrote: On Mon, Jan 23, 2012 at 11:17 PM, Douglas

Re: String interning in Python 3 - missing or moved?

2012-01-24 Thread Chris Angelico
On Tue, Jan 24, 2012 at 7:17 PM, Stefan Behnel stefan...@behnel.de wrote: If you want to encourage them to fill up their memory with user provided data in a non-erasable way, then sure, that would certainly keep an attacker from having to figure out hash collisions in order to bring down a

Re: String interning in Python 3 - missing or moved?

2012-01-24 Thread Chris Rebert
On Tue, Jan 24, 2012 at 12:17 AM, Stefan Behnel stefan...@behnel.de wrote: Chris Angelico, 24.01.2012 05:47: Lua and Pike both quite happily solved hash collision attacks in their interning of strings by randomizing the hash used, because there's no way to rely on it. Presumably (based on the

FYI: Making python.exe capable to work with 3GiB address space

2012-01-24 Thread Thomas Rachel
Hi, I just added some RAM to my PC @ work and now wanted Python to be capable to make use of it. My boot.ini has been containing the /3GB switch for quite a while, but nevertheless I only could allocate 2 GB in Python. So I changed python.exe with the imagecfg.exe which I obtained from

Re: problems with tkinter updates

2012-01-24 Thread Peter Otten
y...@zioup.com wrote: I'm missing something about tkinter updates. How can I give tkinter a chance to run? Here's some code: import time import tkinter import tkinter.scrolledtext tk = tkinter.Tk() f = tkinter.Toplevel(tk) st = tkinter.scrolledtext.ScrolledText(f) st.pack()

Re: A way to write properties

2012-01-24 Thread HEK
On Jan 23, 12:45 pm, Arnaud Delobelle arno...@gmail.com wrote: Hi all, It just occurred to me that there's a very simple but slightly different way to implement properties: class PropertyType(type):     def __get__(self, obj, objtype):         return self if obj is None else self.get(obj)

Re: Parsing a serial stream too slowly

2012-01-24 Thread Ulrich Eckhardt
Am 23.01.2012 22:48, schrieb M.Pekala: I think that regex is too slow for this operation, but I'm uncertain of another method in python that could be faster. A little help would be appreciated. Regardless of the outcome here, I would say that your code is still a bit wonky on the handling of

How to work around a unicode problem?

2012-01-24 Thread tinnews
I have a small python program that uses the pyexiv2 package to view exif data in image files. I've hit a problem because I have a filename with accented characters in its path and the pyexiv2 code traps as follows:- Traceback (most recent call last): File /home/chris/bin/eview.py, line

Re: How to work around a unicode problem?

2012-01-24 Thread Chris Rebert
On Tue, Jan 24, 2012 at 3:57 AM, tinn...@isbd.co.uk wrote: I have a small python program that uses the pyexiv2 package to view exif data in image files. I've hit a problem because I have a filename with accented characters in its path and the pyexiv2 code traps as follows:-    Traceback

Re: How to work around a unicode problem?

2012-01-24 Thread Peter Otten
tinn...@isbd.co.uk wrote: I have a small python program that uses the pyexiv2 package to view exif data in image files. I've hit a problem because I have a filename with accented characters in its path and the pyexiv2 code traps as follows:- Traceback (most recent call last):

Re: Parsing a serial stream too slowly

2012-01-24 Thread Thomas Rachel
Am 24.01.2012 00:13 schrieb Thomas Rachel: [sorry, my Thunderbird kills the indentation] And finally, you can make use of re.finditer() resp. sensorre.finditer(). So you can do sensorre = re.compile(r'\$(.)(.*?)\$') # note the change theonebuffer = '$A1234$$B-10$$C987$' # for now

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Grant Edwards
On 2012-01-24, Chris Angelico ros...@gmail.com wrote: On Tue, Jan 24, 2012 at 4:57 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: [RR's usual schtick] All in favour, say Aye in Latin. All against, say Plonk. I plonked RR ages ago. Now I only get to see his post when somebody replies

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Martin P. Hellwig
On 24/01/2012 05:57, Rick Johnson wrote: cut rant I would wish that pedantic citizens of the British colony in America stopped calling whatever misinterpreted waffle they produce, English. -- mph -- http://mail.python.org/mailman/listinfo/python-list

RE: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Rob Richardson
In America, they haven't spoken it for years! -- Professor Henry Higgins, My Fair Lady -Original Message- On 24/01/2012 05:57, Rick Johnson wrote: cut rant I would wish that pedantic citizens of the British colony in America stopped calling whatever misinterpreted waffle they produce,

PythonWin debugger holds onto global logging objects too long

2012-01-24 Thread Rob Richardson
I use PythonWin to debug the Python scripts we write. Our scripts often use the log2py logging package. When running the scripts inside the debugger, we seem to get one logging object for every time we run the script. The result is that after running the script five times, the log file

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread J
On Tue, Jan 24, 2012 at 09:05, Martin P. Hellwig martin.hell...@gmail.com wrote: On 24/01/2012 05:57, Rick Johnson wrote: cut rant I would wish that pedantic citizens of the British colony in America stopped calling whatever misinterpreted waffle they produce, English. I, sir, as a citizen of

windows and home path

2012-01-24 Thread Andrea Crotti
Window never stops to surprise me, I've been banging my head since yesterday and only now I now what is the problem. So suppose I have something like from os import path print path.expanduser('~') If I run it from cmd.exe I get /Users/user, doing the same in an emacs eshell buffer I get

RE: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Neru Yume
Wh. I did not expect this when I signed up to the Python mailing list. From: dreadpiratej...@gmail.com Date: Tue, 24 Jan 2012 09:51:57 -0500 Subject: Re: The devolution of English language and slothful c.l.p behaviors exposed! To: martin.hell...@gmail.com CC: python-list@python.org

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Benedict Verheyen
On 24/01/2012 7:06, Steven D'Aprano wrote: On Mon, 23 Jan 2012 21:57:16 -0800, Rick Johnson wrote: Here is a grep from the month of September 2011 showing the rampantly egregious misuse of the following words and phrases: * pretty * hard * right * used to * supposed to I'm pretty

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Andrea Crotti
I suggest to create English 2.0, and convince the whole world to speak your own way better implementation of English. -- http://mail.python.org/mailman/listinfo/python-list

Re: windows and home path

2012-01-24 Thread Jerry Hill
On Tue, Jan 24, 2012 at 9:56 AM, Andrea Crotti andrea.crott...@gmail.com wrote: Window never stops to surprise me, I've been banging my head since yesterday and only now I now what is the problem. So suppose I have something like from os import path print path.expanduser('~') If I run it

Re: windows and home path

2012-01-24 Thread Jerry Hill
On Tue, Jan 24, 2012 at 11:05 AM, Jerry Hill malaclyp...@gmail.com wrote: So, my guess is that emacs is mangling your HOME environment variable.  That appears to be confirmed by the emacs documentation here:

Re: windows and home path

2012-01-24 Thread Andrea Crotti
On 01/24/2012 04:05 PM, Jerry Hill wrote: The os.path.exanduser() docs ( http://docs.python.org/library/os.path.html#os.path.expanduser ) say that On Windows, HOME and USERPROFILE will be used if set, otherwise a combination of HOMEPATH and HOMEDRIVE will be used. An initial ~user is handled by

Re: windows and home path

2012-01-24 Thread Andrea Crotti
On 01/24/2012 04:09 PM, Jerry Hill wrote: On Tue, Jan 24, 2012 at 11:05 AM, Jerry Hillmalaclyp...@gmail.com wrote: So, my guess is that emacs is mangling your HOME environment variable. That appears to be confirmed by the emacs documentation here:

Re: windows and home path

2012-01-24 Thread Jerry Hill
On Tue, Jan 24, 2012 at 11:10 AM, Andrea Crotti andrea.crott...@gmail.com wrote: Ah yes thanks for the explanation, on Python 2.7 on Linux I don't see the same doc, it might have been updated later.. Anyway I just want to make sure that I get always the same path, not depending on the program.

Re: windows and home path

2012-01-24 Thread Andrea Crotti
On 01/24/2012 04:09 PM, Jerry Hill wrote: On Tue, Jan 24, 2012 at 11:05 AM, Jerry Hillmalaclyp...@gmail.com wrote: So, my guess is that emacs is mangling your HOME environment variable. That appears to be confirmed by the emacs documentation here:

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Steven D'Aprano
On Tue, 24 Jan 2012 09:21:37 +0100, Jérôme wrote: Mon, 23 Jan 2012 21:57:16 -0800 (PST) Rick Johnson a écrit: Of course, used to and supposed to will require people to rethink there lazy and slothful ways. I don't even see the problem with those... As someone already said, english is a

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Martin P. Hellwig
On 24/01/2012 14:51, J wrote: On Tue, Jan 24, 2012 at 09:05, Martin P. Hellwig martin.hell...@gmail.com wrote: On 24/01/2012 05:57, Rick Johnson wrote: cut rant I would wish that pedantic citizens of the British colony in America stopped calling whatever misinterpreted waffle they produce,

Re: windows and home path

2012-01-24 Thread Andrea Crotti
On 01/24/2012 04:21 PM, Jerry Hill wrote: windows might make the trick.. It would not do the trick on my windows XP workstation here. Your target environments may be different, of course. From a general command prompt (cmd.exe) on my work machine, here's what you would have to work with:

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Chris Angelico
On Wed, Jan 25, 2012 at 3:26 AM, Martin P. Hellwig martin.hell...@gmail.com wrote: Having said that,  I do like to bring to your attention that her Majesty, never ratified the 'Declaration of Independence'. :-) Oh, stop it. It's high time we got rid of these silly distinctions of English and

Re: What happened tp scipy.stsci?

2012-01-24 Thread Eelco
On Jan 23, 6:54 pm, Wanderer wande...@dialup4less.com wrote: Back in scipy 0.7 there was a package called stsci that had  function scipy.stsci.image.median that created a median image from a stack of images. The stsci package is dropped in v0.8. Has this functionality been moved to a different

Re: windows and home path

2012-01-24 Thread Chris Angelico
On Wed, Jan 25, 2012 at 3:36 AM, Andrea Crotti andrea.crott...@gmail.com wrote: I just would like to be able to write somewhere in a place that should always exist, why Windows you're so annoying :(? Can you use the current directory, and rely on the user running your program from a viable

Re: windows and home path

2012-01-24 Thread Andrea Crotti
On 01/24/2012 04:43 PM, Chris Angelico wrote: On Wed, Jan 25, 2012 at 3:36 AM, Andrea Crotti andrea.crott...@gmail.com wrote: I just would like to be able to write somewhere in a place that should always exist, why Windows you're so annoying :(? Can you use the current directory, and rely on

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Blockheads Oi Oi
On 24/01/2012 16:41, Chris Angelico wrote: On Wed, Jan 25, 2012 at 3:26 AM, Martin P. Hellwig martin.hell...@gmail.com wrote: Having said that, I do like to bring to your attention that her Majesty, never ratified the 'Declaration of Independence'. :-) Oh, stop it. It's high time we got rid

dynamically creating classes from text

2012-01-24 Thread T H
I’m new to python, sorry if my question is a bit naive, I was wondering if it is possible to parse some text (ie. from a text file or say html) and then dynamically create a class? for example lets say the contents of the text file is: functionName: bark arg1: numberBarks

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Blockheads Oi Oi
On 24/01/2012 15:46, Andrea Crotti wrote: I suggest to create English 2.0, and convince the whole world to speak your own way better implementation of English. Too late for that when comparing modern English with that of e.g. Dickens, Shakespeare, Chaucer and Bede, hence at a minimum I reckon

Re: How to work around a unicode problem?

2012-01-24 Thread tinnews
Peter Otten __pete...@web.de wrote: tinn...@isbd.co.uk wrote: I have a small python program that uses the pyexiv2 package to view exif data in image files. I've hit a problem because I have a filename with accented characters in its path and the pyexiv2 code traps as follows:-

Re: How to work around a unicode problem?

2012-01-24 Thread tinnews
Chris Rebert c...@rebertia.com wrote: On Tue, Jan 24, 2012 at 3:57 AM, tinn...@isbd.co.uk wrote: I have a small python program that uses the pyexiv2 package to view exif data in image files. I've hit a problem because I have a filename with accented characters in its path and the

Re: dynamically creating classes from text

2012-01-24 Thread Chris Angelico
On Wed, Jan 25, 2012 at 4:22 AM, T H turian9...@gmail.com wrote: I’m new to python, sorry if my question is a bit naive, I was wondering if it is possible to parse some text (ie. from a text file or say html) and then dynamically create a class? Presuming that your class name comes from

calling a simple PyQt application more than once

2012-01-24 Thread Jabba Laci
Hi, I have a simple PyQt application that creates a webkit instance to scrape AJAX web pages. It works well but I can't call it twice. I think the application is not closed correctly, that's why the 2nd call fails. Here is the code below. I also put it on pastebin: http://pastebin.com/gkgSSJHY .

Re: problems with tkinter updates

2012-01-24 Thread woooee
if line is not None: probably does not work the way you expect. You might try if line.strip(): Take a look at this quick example test_lines = [Number 1\n, \n, ] for ctr, line in enumerate(test_lines): print ctr, line if line is not None: print not None --

Re: dynamically creating classes from text

2012-01-24 Thread Marco Nawijn
On Jan 24, 6:22 pm, T H turian9...@gmail.com wrote: I’m new to python, sorry if my question is a bit naive, I was wondering if it is possible to parse some text (ie. from a text file or say html) and then dynamically create a class? for example lets say the contents of the text file is:    

Re: dynamically creating classes from text

2012-01-24 Thread Visgean Skeloru
As I assume the text you want to process has some source you might want to look at http://docs.python.org/library/pickle.html ... 2012/1/24 T H turian9...@gmail.com I’m new to python, sorry if my question is a bit naive, I was wondering if it is possible to parse some text (ie. from a text

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Joshua Landau
On 24 January 2012 17:25, Blockheads Oi Oi breamore...@yahoo.co.uk wrote: On 24/01/2012 15:46, Andrea Crotti wrote: I suggest to create English 2.0, and convince the whole world to speak your own way better implementation of English. Too late for that when comparing modern English with

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Blockheads Oi Oi
On 24/01/2012 20:03, Joshua Landau wrote: On 24 January 2012 17:25, Blockheads Oi Oi breamore...@yahoo.co.uk mailto:breamore...@yahoo.co.uk wrote: On 24/01/2012 15:46, Andrea Crotti wrote: I suggest to create English 2.0, and convince the whole world to speak your

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Chris Angelico
On Wed, Jan 25, 2012 at 8:13 AM, Blockheads Oi Oi breamore...@yahoo.co.uk wrote: On 24/01/2012 20:03, Joshua Landau wrote: A simple version number doesn't imply huge breakages. Try English2 v1.0! In fact, why would a perfect language need a version number? It would be difficult to maintain

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Blockheads Oi Oi
On 24/01/2012 21:20, Chris Angelico wrote: On Wed, Jan 25, 2012 at 8:13 AM, Blockheads Oi Oi breamore...@yahoo.co.uk wrote: On 24/01/2012 20:03, Joshua Landau wrote: A simple version number doesn't imply huge breakages. Try English2 v1.0! In fact, why would a perfect language need a version

unittest and threading

2012-01-24 Thread Ross Boylan
Is it safe to use unittest with threads? In particular, if a unit test fails in some thread other than the one that launched the test, will that information be captured properly? A search of the net shows a suggestion that all failures must be reported in the main thread, but I couldn't find

RE: The devolution of English language and slothful c.l.p behaviours exposed!

2012-01-24 Thread Phil Runciman
Talking about version numbers, shouldn't the English dictionary and grammar be under version control? I nominate Oxford University to administer this, after all they produce the largest English dictionary and are experts on English grammar. Someone had better let them know because the impending

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Rick Johnson
On Jan 23, 11:57 pm, Rick Johnson rantingrickjohn...@gmail.com wrote: Here is a grep from the month of September 2011 showing the rampantly egregious misuse of the following words and phrases: Actually my custom script had a small flaw which kept it from capturing ALL the atrocities. Here is a

Re: The devolution of English language and slothful c.l.p behaviours exposed!

2012-01-24 Thread Blockheads Oi Oi
Top posting fixed. -Original Message- From: Blockheads Oi Oi [mailto:breamore...@yahoo.co.uk] Sent: Wednesday, 25 January 2012 10:26 a.m. To: python-list@python.org Subject: Re: The devolution of English language and slothful c.l.p behaviors exposed! On 24/01/2012 21:20, Chris Angelico

Libxml2 Python Manual

2012-01-24 Thread Mauricio Martinez Garcia
Hello! For libxml2, are there any manual. For this library?, i searched on google and just find the following URL xmlsoft.org Wich can not find any API manual. I will apreciate your support if have one for the library in python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Libxml2 Python Manual

2012-01-24 Thread Nick Dokos
Mauricio Martinez Garcia morfeo...@gmail.com wrote:   For libxml2, are there any manual. For this library?, i searched on google and just find the following URL xmlsoft.org Wich can not find any API manual. Did you check under Reference Manual at http://xmlsoft.org? That's the second entry

Distributing methods of a class across multiple files

2012-01-24 Thread lh
Is this possible please? I have done some searching but it is hard to narrow down Google searches to this question. What I would like to do is, for example: 1) define a class Foo in file test.py... give it some methods 2) define a file test2.py which contains a set of methods that are methods of

Re: Libxml2 Python Manual

2012-01-24 Thread Mauricio Martinez Garcia
Tanks Nicholas. Yes, check the documentation effectively and yet it does not require C programminginformation if not for python, the only site I found examples and libxml2 for python propertiesis as follows http://mikekneller.com/kb/python/libxml2python / part1. And, apart from there to build a

Re: Distributing methods of a class across multiple files

2012-01-24 Thread Roy Smith
In article 569a94a3-cd84-449b-b0c1-80348014a...@i10g2000pbl.googlegroups.com, lh lhughe...@gmail.com wrote: Is this possible please? I have done some searching but it is hard to narrow down Google searches to this question. What I would like to do is, for example: 1) define a class Foo in

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Michael Torrie
On 01/24/2012 05:43 PM, Rick Johnson wrote: Actually my custom script had a small flaw which kept it from capturing ALL the atrocities. Here is a run with the bugfixes: Wow. I had to trim 80% of your e-mail just to get rid of old quoted posts. For an expert, Rick, I'm really surprised you

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Michael Torrie
On 01/24/2012 10:49 PM, Michael Torrie wrote: On 01/24/2012 05:43 PM, Rick Johnson wrote: Actually my custom script had a small flaw which kept it from capturing ALL the atrocities. Here is a run with the bugfixes: Wow. I had to trim 80% of your e-mail just to get rid of old quoted posts.

Re: Distributing methods of a class across multiple files

2012-01-24 Thread Cameron Simpson
On 24Jan2012 19:54, lh lhughe...@gmail.com wrote: | Is this possible please? I have done some searching but it is hard to | narrow down Google searches to this question. What I would like to do | is, for example: | 1) define a class Foo in file test.py... give it some methods | 2) define a file

Re: Libxml2 Python Manual

2012-01-24 Thread Stefan Behnel
Mauricio Martinez Garcia, 25.01.2012 02:46: For libxml2, are there any manual. For this library?, i searched on google and just find the following URL xmlsoft.org Wich can not find any API manual. I will apreciate your support if have one for the library in python. Any reason you're not

Re: unittest and threading

2012-01-24 Thread Steven D'Aprano
On Tue, 24 Jan 2012 13:54:23 -0800, Ross Boylan wrote: Is it safe to use unittest with threads? I see nobody else has answered, so I'll have a go. I think you need to explain what you mean here in a little more detail. If you mean, I have a library that uses threads internally, and I want to

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: If other VMs need this test for some reason, they can easily add a test case themselves. I'm -1 on adding test cases to bug fix releases just for completeness. A lacking test is not a bug, and hence must not be added to a bug fix release.

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 839fa289e226 by Antoine Pitrou in branch '3.2': Issue #13772: In os.symlink() under Windows, do not try to guess the link http://hg.python.org/cpython/rev/839fa289e226 New changeset a7406565ef1c by Antoine Pitrou in

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Should be fixed now! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I propose applying the following patch. The test looks good to me (except we don't remove TESTFN explicitely, but I'm not sure it's really necessary). As for the patch, couldn't we put all the file stream flushing in one place?

[issue11235] Source files with date modifed in 2106 cause OverflowError

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch for 3.2. importlib doesn't have the issue, so I just added a test. -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235

[issue11235] Source files with date modifed in 2106 cause OverflowError

2012-01-24 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- keywords: +patch Added file: http://bugs.python.org/file24310/imptimestampoverflow.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Updated patch sanitizing the various flushes done on exit, as per Charles-François's recommendation. Also removes TESTFN explicitly. -- Added file: http://bugs.python.org/file24311/mpstderrflush2.patch

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Xavier Morel
Xavier Morel xavier.mo...@masklinn.net added the comment: Creating the tables should not be too hard, especially using e.g. org-mode, but: 1. Where should those tables live? The argparse documentation is pretty big and there's no completely obvious place. I would guess table 1. could just

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: LGTM. (I just noticed a bug in Rietveld: when one selects expand 10 after, the line right after that marker appears duplicated in the new view). -- ___ Python tracker rep...@bugs.python.org

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: My specific suggestion is to have a dedicated Quick Reference section before the first example. This section would be aimed at two groups of people: - those wanting a quick overview of the features argparse offers them (This looks

[issue13686] Some notes on the docs of multiprocessing

2012-01-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13686 ___ ___

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: GetSystemTimeAsFileTime() represent durations as multiple of 100ns, unfortunately its value is only updated every 15ms or so. Precision is not accuracy... -- nosy: +amaury.forgeotdarc ___

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-24 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I realised that the lack of a clear binary/text distinction would make it messy to do the split docs in 2.7, so I made a new branch based on 3.2 instead (link to repo updated accordingly). -- assignee: eric.araujo - ncoghlan

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: GetSystemTimeAsFileTime() represent durations as multiple of 100ns, unfortunately its value is only updated every 15ms or so.  Precision is not accuracy... It is possible to improve the accuracy of this clock using the

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Xavier Morel
Xavier Morel xavier.mo...@masklinn.net added the comment: My specific suggestion is to have a dedicated Quick Reference section before the first example. OK, that looks like a good plan. -- ___ Python tracker rep...@bugs.python.org

[issue13841] multiprocessing should use sys.exit() where possible

2012-01-24 Thread sbt
sbt shibt...@gmail.com added the comment: Currently, on both Windows and Unix, when the main thread of a child process exits: * atexit callbacks are NOT run (although multiprocessing.util._exit_function IS run), * the main thread does NOT wait for non-daemonic background threads. A simple

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: NtSetTimerResolution is a system-wide change, and may have impact on other running applications. It may be an option to set it during the execution of profile.run() for example, but I would not enable it just to call time.clock().

[issue13851] Packaging distutils2 for Fedora

2012-01-24 Thread Vikash Agrawal
New submission from Vikash Agrawal vikashagrawal1...@gmail.com: Packaging distutils2 for Fedora The spec file, is attached and lack many things. I also need to add files like README, COPYING etc. The problem is, after installtion of the generated rpm, python

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-24 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: I took a deep dive into parts of CPython that were unknown to me :) and dug up the following: Methods like os.stat or even os.open convert the file name using et in PyArg_ParseTuple[AndKeywords]. OTOH, open() and io.open() just hand through the

[issue13852] Doc fixes with patch

2012-01-24 Thread Boštjan Mejak
New submission from Boštjan Mejak bostjan.me...@gmail.com: I have collected a small amount of documentation fixes in my patch. Please review it and apply it. No pressure. ;) -- assignee: docs@python components: Documentation files: changes.diff keywords: patch messages: 151900 nosy:

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: NtSetTimerResolution is a system-wide change, and may have impact on other running applications.  It may be an option to set it during the execution of profile.run() for example, but I would not enable it just to call

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Yes, fixing the conversion block is probably the right approach. Apparently posixmodule.c uses PyUnicode_FSConverter, perhaps that would work? (also make sure that the case where a bytes string is given is fixed too: open(b\x00) Traceback (most

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: My understanding (and recollection, but I don't have notes I can point at to hand) is that one goal that arose from recent VM and language summits was for the CPython test suite to be used as the validating test suite, with

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Oh, and in case it isn't clear, this request is *coming* from one of the other VMs (pypy), so if my summit recollection is correct, they are in fact adding a test that they need by submitting this issue :) (Or at least they will have

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-24 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Pushed an initial cut to my sandbox branch. Built HTML is attached so you can get a general idea of how it looks (links, etc, obviously won't work). So far, I have made the split into 3 sections and updated the new (shorter) Sequence Types

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13849 ___ ___ Python-bugs-list mailing list

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-24 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: JFTR, file()'s C equivalent is fileio_init and not io_open, I lost track of all the opens. ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13848

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: If so, I think this change should not checked into the 2.7 branch. Instead, a separate branch should be made for changes not intended for CPython, but for Python implementations in general. Making the Python test suite usable for other

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Reconsidering: I think it shouldn't be checked into the cpython *repository*. Instead, if PyPy developers want to contribute changes to the test suite and standard library to improve the standard library, there should be a separate

[issue13851] Packaging distutils2 for Fedora

2012-01-24 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com added the comment: Hi Vikash - thanks for working on this. It's normal when packaging code downstream for Fedora to file a package review request at bugzilla.redhat.com, following the process here: http://fedoraproject.org/wiki/Package_Review_Process (sorry

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-24 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Note: without the Python docs CSS to create the sidebar, the internal table of contents appears at the *bottom* of the rendered page. Really, reviewing this sensibly is probably going to require building the docs locally after using hg pull

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-24 Thread James Sanders
James Sanders bistromath...@gmail.com added the comment: I've submitted a patch that just uses save_global to pickle Ellipsis and NotImplemented, so the resulting pickle should be unpicklable anywhere. I'm completely new to the C API so not sure if the way I am building python strings (to

  1   2   >