Re: [Python-Dev] cProfile and threads

2010-09-08 Thread Kristján Valur Jónsson
Ok, I've been busy with other stuff, but I'm almost finished with a patch to submit as an alternative. cProfile.enable() will then take an "allthreads" argument, which when enabled, will set the profiler state on all threads ­_currently_ running. Now, I only realized this late, but _currently_ i

Re: [Python-Dev] cProfile and threads

2010-09-08 Thread GrosBedo
Hello, Ive just stumbled accross your changes Krisvale, and from your last reply, I can see that you invalidated your changes : I just realized that this is probably a redundant change. > We have C apis to get all the Thread states in an interpreter state (I didn't > even know there was such a

Re: [Python-Dev] cProfile and threads

2010-09-08 Thread GrosBedo
Hello, Ive just stumbled accross your changes Krisvale, and from your last reply, I can see that you invalidated your changes : I just realized that this is probably a redundant change. > We have C apis to get all the Thread states in an interpreter state (I didn't > even know there was such a

Re: [Python-Dev] Behaviour of max() and min() with equal keys

2010-09-08 Thread Matthew Woodcraft
Raymond Hettinger wrote: >Matthew Woodcraft wrote: >> In CPython, the builtin max() and min() have the property that if there >> are items with equal keys, the first item is returned. From a quick look >> at their source, I think this is true for Jython and IronPython too. >> However, this isn'

Re: [Python-Dev] PEP 3149 thoughts

2010-09-08 Thread Barry Warsaw
On Sep 08, 2010, at 09:42 AM, Ralf Schmitt wrote: >If it's useful on unix like systems, why shouldn't it be useful on >windows? Multiple versions of python can be installed on windows >too. And people might also like to share their packages between >installations. I guess the point is *I* don't k

Re: [Python-Dev] Working on the Python code-base with a VIM-based setup

2010-09-08 Thread Kevin Watters
Another shameless plug: My pyflakes.vim plugin will highlight errors as you type: http://www.vim.org/scripts/script.php?script_id=2441 It's really helpful for catching those typos that you usually don't notice until the runtime NameError. Eli Bendersky wrote: Hello pydev, This is a meta-q

Re: [Python-Dev] PEP 384 status

2010-09-08 Thread David Cournapeau
On Wed, Sep 8, 2010 at 7:59 PM, Nick Coghlan wrote: > On Wed, Sep 8, 2010 at 6:34 PM, David Cournapeau wrote: >> In other words, the problem mainly arises when you need to integrate >> libraries which you can not recompile with the compiler used by >> python, because the code is not visual-studio

Re: [Python-Dev] PEP 384 status

2010-09-08 Thread Nick Coghlan
On Wed, Sep 8, 2010 at 6:34 PM, David Cournapeau wrote: > In other words, the problem mainly arises when you need to integrate > libraries which you can not recompile with the compiler used by > python, because the code is not visual-studio compatible, or because > the library is only available in

Re: [Python-Dev] Behaviour of max() and min() with equal keys

2010-09-08 Thread Hrvoje Niksic
On 09/07/2010 11:40 PM, Jeffrey Yasskin wrote: Decimal may actually have this backwards. The idea would be that min(*lst) == sorted(lst)[0], and max(*lst) == sorted(lst)[-1]. Here you mean "is" rather than "==", right? The relations you spelled are guaranteed regardless of stability. (This

Re: [Python-Dev] PEP 384 status

2010-09-08 Thread David Cournapeau
On Wed, Sep 8, 2010 at 5:19 PM, Nick Coghlan wrote: > On Wed, Sep 8, 2010 at 8:34 AM, David Cournapeau wrote: >> I would turn the question around: what are the cases where you manage >> to mix CRT and not getting any issues ? This has never worked in my >> own experience in the context of python

Re: [Python-Dev] PEP 3149 thoughts

2010-09-08 Thread Nick Coghlan
On Wed, Sep 8, 2010 at 5:42 PM, Ralf Schmitt wrote: > Barry Warsaw writes: > >> >> Section added: >> >> Windows >> === >> >> This PEP only addresses build issues on POSIX systems that use the >> ``configure`` script.  While Windows or other platform support is not >> explicitly disallowed und

Re: [Python-Dev] PEP 384 status

2010-09-08 Thread Nick Coghlan
On Wed, Sep 8, 2010 at 8:34 AM, David Cournapeau wrote: > I would turn the question around: what are the cases where you manage > to mix CRT and not getting any issues ? This has never worked in my > own experience in the context of python extensions, I've done it quite a bit over the years with

Re: [Python-Dev] PEP 3149 thoughts

2010-09-08 Thread Ralf Schmitt
Barry Warsaw writes: > > Section added: > > Windows > === > > This PEP only addresses build issues on POSIX systems that use the > ``configure`` script. While Windows or other platform support is not > explicitly disallowed under this PEP, platform expertise is needed in > order to evaluate,

Re: [Python-Dev] Behaviour of max() and min() with equal keys

2010-09-08 Thread Raymond Hettinger
On Sep 7, 2010, at 12:34 PM, Matthew Woodcraft wrote: > In CPython, the builtin max() and min() have the property that if there > are items with equal keys, the first item is returned. From a quick look > at their source, I think this is true for Jython and IronPython too. > > However, this isn'