Re: [Python-Dev] Compressing MSI files: 2.4.2 candidate?

2005-09-22 Thread Vincent Wehren
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of "Martin v. Lowis" > Sent: Thursday, September 22, 2005 9:18 PM > To: Python-Dev > Subject: [Python-Dev] Compressing MSI files: 2.4.2 candidate? > > I just found that I can save somewhat more than

[Python-Dev] Weekly Python Patch/Bug Summary

2005-09-22 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 337 open ( -6) / 2941 closed (+14) / 3278 total ( +8) Bugs: 908 open ( +0) / 5262 closed (+17) / 6170 total (+17) RFE : 194 open ( +5) / 187 closed ( +2) / 381 total ( +7) New / Reopened Patches __ use LIST_

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Guido van Rossum
On 9/22/05, Greg Ewing <[EMAIL PROTECTED]> wrote: > Josiah Carlson wrote: > > > As for list comprehensions, they were literally meant to be a > > completely equivalent translation of a set of for loops. > > I don't think that's quite true. I doubt whether anyone > really thought about the issue whe

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Greg Ewing
Josiah Carlson wrote: > As for list comprehensions, they were literally meant to be a > completely equivalent translation of a set of for loops. I don't think that's quite true. I doubt whether anyone really thought about the issue when LCs were first being discussed. I didn't, but if I had, I wo

Re: [Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-22 Thread Greg Ewing
Jim Jewett wrote: > "Is there anything left?" is a pretty analogy for iterators, > particularly since the examples tend to start with list > or file iterators. But this can't be supported by all iterators, so it would be something special to these iterators. Keeping track of the peculiarities of

Re: [Python-Dev] os.path.diff(path1, path2) (and a first post)

2005-09-22 Thread Bob Ippolito
On Sep 22, 2005, at 8:58 PM, Trent Mick wrote: > [richard barran wrote] > >> So I have a question: do the previous mails mean that a relpath >> function might possibly be a usefull addition to os.path? >> > > Yes, it seems to have support. I'd like to throw in another late +1 here, I've written

Re: [Python-Dev] os.path.diff(path1, path2) (and a first post)

2005-09-22 Thread Trent Mick
[richard barran wrote] > So I have a question: do the previous mails mean that a relpath > function might possibly be a usefull addition to os.path? Yes, it seems to have support. > And if the answer to the previous question is "yes", then should I > submit a patch, or is someone else already

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Terry Reedy
"Bill Janssen" <[EMAIL PROTECTED]> wrote in message news:05Sep22.141518pdt."58617"@synergy1.parc.xerox.com... > Sokolov Jura writes: >> It is so simple to write application server in Python. >> It is so difficult to make it scallable in CPython. >> CPython will not be wide popular without real mu

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Bill Janssen
Sokolov Jura writes: > It is so simple to write application server in Python. > It is so difficult to make it scallable in CPython. > CPython will not be wide popular without real multithreading. He's right. Bill ___ Python-Dev mailing list Python-Dev@p

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Guido van Rossum
Please end this thread. It belongs in c.l.py. Nothing's going to change. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: h

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Josiah Carlson
Alexander Myodov <[EMAIL PROTECTED]> wrote: > >> "for (int i = 0; i < 10; i++)" works fine nowadays. > JC> I'm sorry, but you are wrong. The C99 spec states that you must define > JC> the type of i before using it in the loop. Maybe you are thinking of > JC> C++, which allows such things. > "gc

Re: [Python-Dev] os.path.diff(path1, path2) (and a first post)

2005-09-22 Thread richard barran
On Sat, 17 Sep 2005, John J Lee wrote: > > On Fri, 16 Sep 2005, Greg Ewing wrote: > > > Trent Mick wrote: > > > > > If this *does* get added (I'm +0) then let's call it "relpath" or > > > "relpathto" as in the various implementations out there: > > > > +1 on that, too. Preferably just "re

Re: [Python-Dev] vendor-packages directory

2005-09-22 Thread Phillip J. Eby
At 01:18 PM 9/22/2005 -0700, Rich Burridge wrote: >Phillip J. Eby wrote: >>Right - I'm proposing you add a vendor-packages.pth file to >>site-pacakges, that points to a "totally separate base directory" where >>those files are installed, not that you install the packages themselves >>under site-

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Alexander Myodov
Hello Josiah, >> i = 0 >> while i != 1: >> i += 1 >> j = 5 >> print j JC> Maybe you don't realize this, but C's while also 'leaks' internal JC> variables... JC> int i = 0, j; JC> while (i != 1) { JC> i++; JC> j = 5; JC> } JC> printf("%i %i\n", i, j); Yeah, it may *leak* it in your

Re: [Python-Dev] vendor-packages directory

2005-09-22 Thread Bob Ippolito
On Sep 22, 2005, at 3:04 PM, Rich Burridge wrote: > Phillip J. Eby wrote: > >>> Recently I asked about the inclusion of a "vendor-packages" >>> directory for Python on the Python mailing list. >>> >>> See the thread started at: >>> >>> >>> http://mail.python.org/pipermail/python-list/2005-Septemb

Re: [Python-Dev] vendor-packages directory

2005-09-22 Thread Bob Ippolito
On Sep 22, 2005, at 3:56 PM, Phillip J. Eby wrote: > At 12:04 PM 9/22/2005 -0700, Rich Burridge wrote: > >> Phillip J. Eby wrote: >> Recently I asked about the inclusion of a "vendor-packages" directory for Python on the Python mailing list. See the thread started at: >>>

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Phillip J. Eby
At 08:42 PM 9/22/2005 +0200, Fredrik Lundh wrote: >Phillip J. Eby wrote: > >At 10:27 AM 9/22/2005 +0400, Sokolov Yura wrote: > >>It is so simple to write application server in Python. > >>It is so difficult to make it scallable in CPython. > > > > It seems you've never heard of fork(), which works

Re: [Python-Dev] vendor-packages directory

2005-09-22 Thread Phillip J. Eby
At 12:04 PM 9/22/2005 -0700, Rich Burridge wrote: >Phillip J. Eby wrote: >>>Recently I asked about the inclusion of a "vendor-packages" >>>directory for Python on the Python mailing list. >>> >>>See the thread started at: >>> >>>http://mail.python.org/pipermail/python-list/2005-September/300029.htm

Re: [Python-Dev] vendor-packages directory

2005-09-22 Thread Rich Burridge
Phillip J. Eby wrote: >> Recently I asked about the inclusion of a "vendor-packages" >> directory for Python on the Python mailing list. >> >> See the thread started at: >> >> >> http://mail.python.org/pipermail/python-list/2005-September/300029.html >> >> for the full reasoning behind this req

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Gregory P. Smith
On Mon, Sep 19, 2005 at 09:12:05PM +0100, Michael Hudson wrote: > Martin Blais <[EMAIL PROTECTED]> writes: > > On 9/18/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > >> On 9/17/05, John J Lee <[EMAIL PROTECTED]> wrote: > >> > I realize that not all algorithms (nor all computational problems) sca

[Python-Dev] Compressing MSI files: 2.4.2 candidate?

2005-09-22 Thread Martin v. Löwis
I just found that I can save somewhat more than 1MiB in the MSI file by using LZX:21 instead of the standard MSZIP when compressing the CAB file. A resulting package can be found at http://www.dcl.hpi.uni-potsdam.de/home/loewis/python-2.4.2c1.msi Can people please test whether this installs just

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Josiah Carlson
Alexander Myodov <[EMAIL PROTECTED]> wrote: [snip Alexander Myodov complaining about how Python works] > i = 0 > while i != 1: > i += 1 > j = 5 > print j Maybe you don't realize this, but C's while also 'leaks' internal variables... int i = 0, j; while (i != 1) { i++; j = 5; } p

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Fredrik Lundh
Phillip J. Eby wrote: >>It is so simple to write application server in Python. >>It is so difficult to make it scallable in CPython. > > It seems you've never heard of fork(), which works just fine to scale > Python processes on multiprocessor boxes. there's a version of fork hidden somewhere in

Re: [Python-Dev] vendor-packages directory

2005-09-22 Thread Phillip J. Eby
At 08:19 AM 9/22/2005 -0700, Rich Burridge wrote: >Hi, > >Recently I asked about the inclusion of a "vendor-packages" >directory for Python on the Python mailing list. > >See the thread started at: > >http://mail.python.org/pipermail/python-list/2005-September/300029.html > >for the full reaso

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Phillip J. Eby
At 10:27 AM 9/22/2005 +0400, Sokolov Yura wrote: >It is so simple to write application server in Python. >It is so difficult to make it scallable in CPython. It seems you've never heard of fork(), which works just fine to scale Python processes on multiprocessor boxes. I've actually done this, a

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Terry Reedy
"Alexander Myodov" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why the variables defined inside "for"/"while"/"if" statements > (including loop variables for "for") are visible outside this scope? Questions about why Python is the way it is belong on comp.lang.python, the gene

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Oleg Broytmann
On Thu, Sep 22, 2005 at 10:27:10AM +0400, Sokolov Yura wrote: > MULTIPROCESSING RULES!!! Everything in programming is about "divide and conquer". Separate and control. Modules. Classes. Namespaces. And now that multithreading with shared memory. That's an evil idea, it causes a lot of troubl

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Gareth McCaughan
Alexander Myodov wrote: > Thus, your example falls to case 1: "i" variable is newly declared for > this loop. Well, we don't reuse old value of i to start the iteration > from a particular place, like below? > > i = 5 > for i in [3,4,5,6,7]: > print i, > > More general, the variables could b

Re: [Python-Dev] IMPORTANT: release24-maint branch is FROZEN from 2005-09-21 00:00 UTC for 2.4.2

2005-09-22 Thread Michael Hudson
Jeremy Maxfield <[EMAIL PROTECTED]> writes: > Sorry I think you're 'much mistaken'... > > The revision of PyState.c in the rc242c1 looks like 2.38.22 (should be > 2.42) > and threadmodule.c looks like 2.59 (should be 2.64) Looks like you're right but SF CVS is being *astonishingly* slow right

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Wilfredo Sánchez Vega
IIRC, it doesn't exist on such a system; that's a Mac OS command, not a Darwin command. (The man page correctly has "Mac OS X" in the footnote, not "Darwin" or "BSD", though I don't know that you can rely on that 100%.) -wsv On Sep 22, 2005, at 10:20 AM, Guido van Rossum wrote: O

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Wilfredo Sánchez Vega
Shockingly, it even says that parsing the file is "a better way" than using gestaltSystemVersion(). It's better for python, anyway, I think, since it doesn't require access to the Carbon API set. Be sure to handle the case where the file doesn't exist: import os version_info_

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Wilfredo Sánchez Vega
"rhapsody" is emitted by uname on Mac OS X Server 1.x, but not on anything we ship today. Bob's right, the version number from uname only tells you about the kernel, and not whether, for example, the Cocoa API is on the system (it wouldn't be on a standalone Darwin OS install, which wil

[Python-Dev] vendor-packages directory

2005-09-22 Thread Rich Burridge
Hi, Recently I asked about the inclusion of a "vendor-packages" directory for Python on the Python mailing list. See the thread started at: http://mail.python.org/pipermail/python-list/2005-September/300029.html for the full reasoning behind this request, and the replies I received. I then

[Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Sokolov Yura
Ok. While windows already prefers threads, while linux-2.6 improves thread support and speed, while process startup expensive on time and memory, while we ought to dublicate our data and/or use obscure shared memory, while it is much simpler to make threaded program with care just about locks th

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Alexander Myodov
Hello Josiah, >> Why the variables defined inside "for"/"while"/"if" statements >> (including loop variables for "for") are visible outside this scope? JC> if and while statements don't define variables, so they can't expose JC> them later in the scope. They don't. They just leak internal ones:

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Bob Ippolito
/usr/bin/sw_vers technically calls a private (at least undocumented) CoreFoundation API, it doesn't parse that plist directly :) On further inspection, it looks like parsing the plist directly is supported API these days (see the bottom of ): import plistlib dct = plistlib.Plist.fromFile('/Sy

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-22 Thread Josiah Carlson
"Andrew Koenig" <[EMAIL PROTECTED]> wrote: > > > > My problem with this syntax is that it can be hard to read: > > > > return if self.arg is None then default else self.arg > > > > looks worryingly like > > > > return NAME NAME.NAME NAME NAME NAME NAME NAME NAME.NAME > > > > to me. > > Inte

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Josiah Carlson
Alexander Myodov <[EMAIL PROTECTED]> wrote: > Hello, > > Don't want to be importunate annoyingly asking the things probably > trivial for experienced community, but need to ask it anyway, after > spending about two hours trying to find well-camouflaged error caused > by it. In the future yo

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Guido van Rossum
Thanks all! I won't touch it. /usr/bin/sw_vers is the way to go. On 9/22/05, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > Ronald Oussoren wrote: > > > > On 22-sep-2005, at 5:26, Guido van Rossum wrote: > > > >> The platform module has a way to map system names such as returned by > >> uname() to mar

Re: [Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-22 Thread Guido van Rossum
On 9/22/05, Jim Jewett <[EMAIL PROTECTED]> wrote: > "Is there anything left?" is a pretty analogy for iterators, But unmaintainable for iterators in general. This was considered ad nauseam when iterators were initially introduced, and it was an explicit decision *not* to provide an API to look ahe

Re: [Python-Dev] IMPORTANT: release24-maint branch is FROZEN from 2005-09-21 00:00 UTC for 2.4.2

2005-09-22 Thread Jeremy Maxfield
Sorry I think you're 'much mistaken'...   The revision of PyState.c in the rc242c1  looks like 2.38.22 (should be 2.42) and threadmodule.c looks like  2.59 (should be 2.64)   Cheers, Max  On 9/22/05, Michael Hudson <[EMAIL PROTECTED]> wrote: Anthony Baxter <[EMAIL PROTECTED]> writes: > On Thursday

Re: [Python-Dev] unintentional and unsafe use of realpath()

2005-09-22 Thread misa
Filed: https://sourceforge.net/tracker/index.php?func=detail&aid=1298813&group_id=5470&atid=305470 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169046 Misa On Wed, Sep 21, 2005 at 12:04:03PM -0400, Peter Jones wrote: > On Wed, 2005-09-14 at 15:25 -0400, Peter Jones wrote: > [ comments a

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-22 Thread Andrew Koenig
> My problem with this syntax is that it can be hard to read: > > return if self.arg is None then default else self.arg > > looks worryingly like > > return NAME NAME.NAME NAME NAME NAME NAME NAME NAME.NAME > > to me. Interesting. What about return if self.arg is None: default else:

Re: [Python-Dev] IMPORTANT: release24-maint branch is FROZEN from 2005-09-21 00:00 UTC for 2.4.2

2005-09-22 Thread Jeremy Maxfield
I don't think it's too risky.   Michael Hudson did the work and it's been checked into the python CVS for a while. (Python/pystate.c Rev 2.42 and Modules/threadmodule.c Rev 2.64 are required files).   We're stuck on Python 2.3.3 because of this bug...(2.4 thread code with this bug was backported to

Re: [Python-Dev] IMPORTANT: release24-maint branch is FROZEN from 2005-09-21 00:00 UTC for 2.4.2

2005-09-22 Thread Michael Hudson
Anthony Baxter <[EMAIL PROTECTED]> writes: > On Thursday 22 September 2005 23:36, Jeremy Maxfield wrote: >> Can the fix for [ 1163563 ] Sub threads execute in restricted mode >> ( >> http://sourceforge.net/tracker/index.php?func=detail&aid=1163563&gr >>oup_id=5470&atid=105470 ) >> go in before 2.4

[Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Alexander Myodov
Hello, Don't want to be importunate annoyingly asking the things probably trivial for experienced community, but need to ask it anyway, after spending about two hours trying to find well-camouflaged error caused by it. Why the variables defined inside "for"/"while"/"if" statements (includi

Re: [Python-Dev] IMPORTANT: release24-maint branch is THAWED (partly frozen ; )

2005-09-22 Thread Anthony Baxter
So the 2.4.2c1 release seems to be not a brown-paper-bag release. The branch should be considered ok for those critical fixes that need to go in before 2.4.2 final - please, please, if you're not absolutely sure, ask me first. Anthony -- Anthony Baxter <[EMAIL PROTECTED]> It's never too l

Re: [Python-Dev] IMPORTANT: release24-maint branch is FROZEN from 2005-09-21 00:00 UTC for 2.4.2

2005-09-22 Thread Anthony Baxter
On Thursday 22 September 2005 23:36, Jeremy Maxfield wrote: > Can the fix for [ 1163563 ] Sub threads execute in restricted mode > ( > http://sourceforge.net/tracker/index.php?func=detail&aid=1163563&gr >oup_id=5470&atid=105470 ) > go in before 2.4.2 final? > This is a real show stopper for us - we

[Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-22 Thread Jim Jewett
Greg Ewing wrote: > But if the docs don't mention anything about true or > false values for some particular type, one tends to > assume that all values are true, as is the default > for user-defined classes. The tutorials and such stress that python doesn't typically care about a specific "True"

Re: [Python-Dev] IMPORTANT: release24-maint branch is FROZEN from 2005-09-21 00:00 UTC for 2.4.2

2005-09-22 Thread Jeremy Maxfield
Can the fix for [ 1163563 ] Sub threads execute in restricted mode (http://sourceforge.net/tracker/index.php?func=detail&aid=1163563&group_id=5470&atid=105470 ) go in before 2.4.2 final? This is a real show stopper for us - we can't move to 2.4 without it. Cheers, Max  On 9/22/05, Michael Hudson <

Re: [Python-Dev] "and" and "or" operators in Py3.0

2005-09-22 Thread Andrew Koenig
> In C, C++, C#, Java, and JavaScript, what do you get when you print the > result of 3 || 10? In C and C++, you get 1. (in c++ the result is actually true, not 1, but true prints as 1 by default for backward compatibility) ___ Python-Dev mailing lis

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Antoine Pitrou
Hi, > On *nix, use a unix domain socket (location in the filesystem which acts > as a listening socket). On Windows, you can use cTypes, pywin32, etc., > to create a global mutex and/or COM interface. Ok, but for a very simple and crude need like mine (the application code using this IPC means

Re: [Python-Dev] IMPORTANT: release24-maint branch is FROZEN from 2005-09-21 00:00 UTC for 2.4.2

2005-09-22 Thread Michael Hudson
Reinhold Birkenfeld <[EMAIL PROTECTED]> writes: > Anthony Baxter wrote: >> Starting in about 11 hours time, the release24-maint branch is FROZEN >> for the 2.4.2c1 release. The freeze will last for around a day, and >> then we're in a state of mostly-frozen for another week, until 2.4.2 >> (fin

Re: [Python-Dev] IMPORTANT: release24-maint branch is FROZEN from 2005-09-21 00:00 UTC for 2.4.2

2005-09-22 Thread Reinhold Birkenfeld
Anthony Baxter wrote: > Starting in about 11 hours time, the release24-maint branch is FROZEN > for the 2.4.2c1 release. The freeze will last for around a day, and > then we're in a state of mostly-frozen for another week, until 2.4.2 > (final). During that week, please don't check things into t

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread M.-A. Lemburg
Ronald Oussoren wrote: > > On 22-sep-2005, at 5:26, Guido van Rossum wrote: > >> The platform module has a way to map system names such as returned by >> uname() to marketing names. It maps SunOS to Solaris, for example. But >> it doesn't map Darwin to Mac OS X. I think I know how to map Darwin >

[Python-Dev] RELEASED Python 2.4.2, release candidate 1

2005-09-22 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.2 (release candidate 1). Python 2.4.2 is a bug-fix release. See the release notes at the website (also available as Misc/NEWS in the source distribution) for details of the more tha