Re: sigaction?

2010-11-07 Thread Lawrence D'Oliveiro
In message mailman.610.1288890213.2218.python-l...@python.org, Neal Becker wrote: I'm interested in trying sigaction with SA_RESTART to prevent interrupted system calls. Worse-is-better strikes again http://en.wikipedia.org/wiki/PCLSRing ... --

Re: Allowing comments after the line continuation backslash

2010-11-07 Thread Lawrence D'Oliveiro
In message roy-0ed9f0.08443706112...@news.panix.com, Roy Smith wrote: In article ib2vrb$3e...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 8jd3m9fr5...@mid.individual.net, Neil Cerutti wrote: On 2010-11-03, Ben Finney

Re: subclassing str

2010-11-07 Thread Chris Rebert
On Sat, Nov 6, 2010 at 10:43 PM, not1xor1 (Alessandro) @libero.it wrote: Hi, I'd like to know what is the best way to subclass str I need to add some new methods and that each method (both new and str ones) return my new type For instance I've seen I can do: class mystr(str):   def

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Seebs
On 2010-11-07, Nobody nob...@nowhere.com wrote: I'm arguing that the reference manual reads too much like a specification. E.g. look at 5.2.4. List displays and tell me whether you consider that it adequately /explains/ list displays to someone wishing to use them. Seems pretty explanatory to

Re: Allowing comments after the line continuation backslash

2010-11-07 Thread Steven D'Aprano
On Sun, 07 Nov 2010 19:33:52 +1300, Lawrence D'Oliveiro wrote: for \ Description, Attr, ColorList \ in \ ( (normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,

Re: Popen Question

2010-11-07 Thread moogyd
Hi, Thanks everyone for the replies - it is now clearer. Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: execute shell script from python, needs sys.argv

2010-11-07 Thread Lawrence D'Oliveiro
In message 1vmbd65uaj2snq1v0vo49ktn0lsc2o5...@4ax.com, Tim Roberts wrote: I KNOW that we're still working on syntax here, and that it's too early for optimization, but it bothers me to see cat as the first thing in a pipeline. An anti-UUOC instinct. Very good. :) --

Re: Silly newbie question - Caret character (^)

2010-11-07 Thread Lawrence D'Oliveiro
In message pan.2010.11.06.23.19.1...@nowhere.com, Nobody wrote: A reference manual tells you how to use the language. A specification tells you how to implement it. Speaking as someone who has read more reference manuals/specifications/whatever you want to call them than I can count, I have

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message iapom0$k4...@speranza.aioe.org, Tim Harig wrote: I agree with Seebs, Python is the only language I know that promotes the use of spaces over tabs; and there are equally picky syntaxs (ie, Makefiles) that mandate the use of tabs. That’s widely conceded to be a misfeature of Make.

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message iat59a$re...@reader1.panix.com, Grant Edwards wrote: But without the colon, how are people who write programming editors going to know when to increase the indentation level as I enter code? I hate editors (or editing modes) that think they know when to change indentation level on

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message 8jftftfel...@mid.individual.net, Neil Cerutti wrote: The handsome ':' terminator of if/elif/if statements allows us to omit a newline, conserving vertical space. This improves the readability of certain constructs. if x: print(x) elif y: print(y) else: print() I would never do

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message 87sjzige0r@benfinney.id.au, Ben Finney wrote: Seebs usenet-nos...@seebs.net writes: On 2010-11-03, Steven D'Aprano steve-remove-t...@cybersource.com.au wrote: Python does explicitly mark blocks. It does it by changes in indentation. An indent is an explicit start-block. An

Re: cms 4 static pages?

2010-11-07 Thread Lawrence D'Oliveiro
In message iatkpf$jd...@online.de, Guido Stepken wrote: a not database driven What do you mean by “database”? Even flat files can be “databases”. -- http://mail.python.org/mailman/listinfo/python-list

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Roy Smith
In article slrnidc7r1.138j.usenet-nos...@guild.seebs.net, Seebs usenet-nos...@seebs.net wrote: On 2010-11-07, Roy Smith r...@panix.com wrote: Any self-respecting C++ programmer would have given up the scavenger hunt by now. Just kept throwing typecasts at your code until it compiles,

Re: Compare source code

2010-11-07 Thread Mark Wooding
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: I would never do that. “Conserving vertical space” seems a stupid reason for doing it. Vertical space is a limiting factor on how much code one can see at a time. I use old-fashioned CRT monitors with 4x3 aspect ratios and

Re: Deditor 0.2.2

2010-11-07 Thread Kruptein
I also uploaded a video with sound because there were a lot of people that asked that. link: http://www.youtube.com/watch?v=zidKSPWBGxU -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-07 Thread Grant Edwards
On 2010-11-07, Mark Wooding m...@distorted.org.uk wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: I would never do that. Conserving vertical space seems a stupid reason for doing it. Vertical space is a limiting factor on how much code one can see at a time. And one

Re: Compare source code

2010-11-07 Thread Grant Edwards
On 2010-11-07, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 87sjzige0r@benfinney.id.au, Ben Finney wrote: Seebs usenet-nos...@seebs.net writes: On 2010-11-03, Steven D'Aprano steve-remove-t...@cybersource.com.au wrote: Python does explicitly mark blocks. It

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Mark Wooding
Nobody nob...@nowhere.com writes: You're taking how too literally, so let me rephrase that: A reference manual tells you what you need to know in order to use the language. A specification tells you what you need to know in order to implement it. I still don't see those as being

Re: Allowing comments after the line continuation backslash

2010-11-07 Thread Mark Wooding
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: Not surprising, since the above list has become completely divorced from its original purpose. Anybody remember what that was? It was supposed to be used in a loop, as follows: for \ Description, Attr, ColorList \

Re: python test frameworks

2010-11-07 Thread Kev Dwyer
On Sun, 07 Nov 2010 10:56:46 +0530, Rustom Mody wrote: There are a large number of test frameworks in/for python. Apart from what comes builtin with python there seems to be nose, staf, qmtest etc etc. Is there any central place where these are listed with short descriptions? 'Test

Re: Compare source code

2010-11-07 Thread Steve Holden
On 11/7/2010 8:23 AM, Grant Edwards wrote: [...] (I bought 4:3 monitors before they got replaced by cheap 16:8 screens) I think you'll find the new aspect ration is 16:9. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17

Re: ANN: PyQt v4.8.1 Released

2010-11-07 Thread Дамјан Георгиевски
Given the context, PyQt is available under the GPL and a commercial license, the commercial license Phil is talking about is not the GPL. Which is a wrong interpretation of “commercial”. But he is not interpreting either “commercial” or GPL. What he says is: here's the code for free

Re: Compare source code

2010-11-07 Thread Roy Smith
In article 87oca1b8ba.fsf@metalzone.distorted.org.uk, m...@distorted.org.uk (Mark Wooding) wrote: Vertical space is a limiting factor on how much code one can see at a time. Yup. Over three decades of programming, my personal upper bound for how long a function should be has always been

Re: Compare source code

2010-11-07 Thread Tim Chase
On 11/07/10 08:26, Steve Holden wrote: On 11/7/2010 8:23 AM, Grant Edwards wrote: [...] (I bought 4:3 monitors before they got replaced by cheap 16:8 screens) I think you'll find the new aspect ration is 16:9. Unless that's why they're cheap...

Re: Silly newbie question - Caret character (^)

2010-11-07 Thread Emile van Sebille
On 11/7/2010 2:26 AM Lawrence D'Oliveiro said... In messagepan.2010.11.06.23.19.1...@nowhere.com, Nobody wrote: A reference manual tells you how to use the language. A specification tells you how to implement it. Speaking as someone who has read more reference manuals/specifications/whatever

Re: Compare source code

2010-11-07 Thread Grant Edwards
On 2010-11-07, Steve Holden st...@holdenweb.com wrote: On 11/7/2010 8:23 AM, Grant Edwards wrote: [...] (I bought 4:3 monitors before they got replaced by cheap 16:8 screens) I think you'll find the new aspect ration is 16:9. I knew that. My keyboard didn't. I recently bought a close-out

Re: Compare source code

2010-11-07 Thread Ethan Furman
Seebs wrote: On 2010-11-05, Ethan Furman et...@stoneleaf.us wrote: The verifiable benefit for me is ease of use, ease of thought, ease of typing... I realize these are not benefits for everyone, but they are for some -- and I would venture a guess that the ease of thought benefit is one of

Re: Compare source code

2010-11-07 Thread Ethan Furman
Lawrence D'Oliveiro wrote: In message iapom0$k4...@speranza.aioe.org, Tim Harig wrote: I personally prefer tabs as it lets *me* decide how far the apparent indentations are in the code. But they don’t. Other people can have different settings, and they will see different indentations for

Re: Compare source code

2010-11-07 Thread Steve Holden
On 11/7/2010 10:46 AM, Grant Edwards wrote: On 2010-11-07, Steve Holden st...@holdenweb.com wrote: On 11/7/2010 8:23 AM, Grant Edwards wrote: [...] (I bought 4:3 monitors before they got replaced by cheap 16:8 screens) I think you'll find the new aspect ration is 16:9. aspect ration.

Re: ANN: PyQt v4.8.1 Released

2010-11-07 Thread Robert Kern
On 2010-11-07 08:39 , Дамјан Георгиевски wrote: Given the context, PyQt is available under the GPL and a commercial license, the commercial license Phil is talking about is not the GPL. Which is a wrong interpretation of “commercial”. But he is not interpreting either “commercial” or GPL.

Re: python test frameworks

2010-11-07 Thread rustom
On Nov 7, 7:09 pm, Kev Dwyer kevin.p.dw...@gmail.com wrote: On Sun, 07 Nov 2010 10:56:46 +0530, Rustom Mody wrote: There are a large number of test frameworks in/for python.  Apart from what comes builtin with python there seems to be nose, staf, qmtest etc etc. Is there any central

A question about yield

2010-11-07 Thread chad
I have an input file named 'freq' which contains the following data 123 0 133 3 146 1 200 0 233 10 400 2 Now I've attempted to write a script that would take a number from the standard input and then have the program return the number in the input file that is closest to that input file.

Re: A question about yield

2010-11-07 Thread chad
On Nov 7, 9:34 am, chad cdal...@gmail.com wrote: I have an input file named 'freq' which contains the following data 123 0 133 3 146 1 200 0 233 10 400 2 Now I've attempted to write a script that would take a number from the standard input and then have the program return the number

Re: A question about yield

2010-11-07 Thread Chris Rebert
On Sun, Nov 7, 2010 at 9:34 AM, chad cdal...@gmail.com wrote: snip #!/usr/local/bin/python import sys def construct_set(data):    for line in data:        lines = line.splitlines()        for curline in lines:            if curline.strip():                key = curline.split(' ')        

Re: Compare source code

2010-11-07 Thread Seebs
On 2010-11-07, Grant Edwards inva...@invalid.invalid wrote: On 2010-11-07, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 87sjzige0r@benfinney.id.au, Ben Finney wrote: The more general answer is: the block is explicitly ended where the indentation ends. That's

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Seebs
On 2010-11-07, Roy Smith r...@panix.com wrote: Well, maybe I was being a little sarcastic. The real point was that if you make it hard for people to do the right thing (i.e. look up the details in the reference manual), you should not be surprised if they do the wrong thing (i.e. find some

Re: A question about yield

2010-11-07 Thread chad
On Nov 7, 9:47 am, Chris Rebert c...@rebertia.com wrote: On Sun, Nov 7, 2010 at 9:34 AM, chad cdal...@gmail.com wrote: snip #!/usr/local/bin/python import sys def construct_set(data):    for line in data:        lines = line.splitlines()        for curline in lines:          

Re: Compare source code

2010-11-07 Thread Seebs
On 2010-11-07, Mark Wooding m...@distorted.org.uk wrote: I've no idea how people manage with these ridiculous widescreen monitors. Side space used for Other Stuff. It takes some reworking of the layout, but overall I sorta like it now. -s -- Copyright 2010, all wrongs reversed. Peter Seebach

Re: A question about yield

2010-11-07 Thread Chris Rebert
On Sun, Nov 7, 2010 at 9:56 AM, chad cdal...@gmail.com wrote: On Nov 7, 9:47 am, Chris Rebert c...@rebertia.com wrote: On Sun, Nov 7, 2010 at 9:34 AM, chad cdal...@gmail.com wrote: snip #!/usr/local/bin/python import sys def construct_set(data):    for line in data:        lines =

Making ActivePython and Python co-exist on Windows

2010-11-07 Thread CWC
I'm new to Python. Is it possible to make ActivePython 3.12 and Python 3.12 co-exist on Windows? I've got an app which requires the former, but I want to stay with the latter, since I'm interested in getting into development. The main area of collision appears to be the Registry. --

Re: Compare source code

2010-11-07 Thread Seebs
On 2010-11-07, Ethan Furman et...@stoneleaf.us wrote: Seebs wrote: On 2010-11-05, Ethan Furman et...@stoneleaf.us wrote: The verifiable benefit for me is ease of use, ease of thought, ease of typing... I realize these are not benefits for everyone, but they are for some -- and I would

{ '0':'c-c-a' ,'1':'a-b-a' .........}

2010-11-07 Thread chris
Hi, have anybody a hint , how i get a dict from non unique id's and their different related values. Thanks for advance Chris ###random data # a=range(10)*3 def seqelem(): i=random.randint(0,2) elem=['a','b','c'][i] return elem s=[seqelem() for t in range(30)] print zip(a,s) ##

Re: Making ActivePython and Python co-exist on Windows

2010-11-07 Thread Benjamin Kaplan
On Sun, Nov 7, 2010 at 2:25 PM, CWC c...@cwc.name wrote: I'm new to Python.  Is it possible to make ActivePython 3.12 and Python 3.12 co-exist on Windows?  I've got an app which requires the former, but I want to stay with the latter, since I'm interested in getting into development.  The main

Re: { '0':'c-c-a' ,'1':'a-b-a' .........}

2010-11-07 Thread John Ladasky
Hi Chris, I may have time to look at the rest of your code later. For now I just want to comment on one line: On Nov 7, 12:24 pm, chris oz...@web.de wrote:     elem=['a','b','c'][i] The string type, just like the list type, is a sequence type. So strings have all the standard sequence

Re: { '0':'c-c-a' ,'1':'a-b-a' .........}

2010-11-07 Thread Arnaud Delobelle
chris oz...@web.de writes: Hi, have anybody a hint , how i get a dict from non unique id's and their different related values. Thanks for advance Chris ###random data # a=range(10)*3 def seqelem(): i=random.randint(0,2) elem=['a','b','c'][i] return elem s=[seqelem()

Re: { '0':'c-c-a' ,'1':'a-b-a' .........}

2010-11-07 Thread Peter Otten
chris wrote: have anybody a hint , how i get a dict from non unique id's and their different related values. Thanks for advance Chris ###random data # a=range(10)*3 def seqelem(): i=random.randint(0,2) elem=['a','b','c'][i] return elem s=[seqelem() for t in range(30)]

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENTperformance - cheers to NEW CONS ***

2010-11-07 Thread small Pox
*** FBI gets a warm welcome in Chicago for their EXCELLENT performance - cheers to NEW CONS *** http://www.youtube.com/watch?v=eq2ZvSd-z0Mfeature=player_embeddedrelated http://www.youtube.com/watch?v=eq2ZvSd-z0Mfeature=player_embeddedrelated

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENT performance - cheers to NEW CONS ***

2010-11-07 Thread small Pox
On Nov 2, 10:03 am, t...@sevak.isi.edu (Thomas A. Russ) wrote: silver light lightsilv...@gmail.com writes: *** FBI gets a warm welcome in Chicago for their EXCELLENT performance - cheers to NEW CONS *** Oh geez.  Just when we've beaten back the infix hordes, someone comes up and suggests

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Philip Semanchuk
On Nov 6, 2010, at 10:45 AM, D'Arcy J.M. Cain wrote: On Sat, 6 Nov 2010 10:22:47 -0400 Philip Semanchuk phi...@semanchuk.com wrote: The tutorial isn't meant as an exhaustive lesson on every single Python feature. I agree, and I don't expect otherwise. My point was that if the tutorial

Cross compiling (i386 from amd64) with distutils

2010-11-07 Thread Jason
My situation is this: I have a Diamond Systems single-board computer with a matching GPIO board. DS have a library for controlling the GPIO board... but it's a static library (libdscud-6.02.a) with an accompanying header (dscud.h). I'd like to create a Python extension to use the device. The

Re: Cross compiling (i386 from amd64) with distutils

2010-11-07 Thread Martin v. Loewis
So is it possible to get distutils to cross compile something like this, and if so, what am I missing? Or am I using the wrong tool for the job? At a minimum, you should be using the target's python binary. distutils has close-to-none cross-compiling support. You can solve some of the problems

Re: Silly newbie question - Caret character (^)

2010-11-07 Thread Lawrence D'Oliveiro
In message mailman.716.1289144941.2218.python-l...@python.org, Emile van Sebille wrote: On 11/7/2010 2:26 AM Lawrence D'Oliveiro said... In messagepan.2010.11.06.23.19.1...@nowhere.com, Nobody wrote: A reference manual tells you how to use the language. A specification tells you how to

Re: ANN: PyQt v4.8.1 Released

2010-11-07 Thread Lawrence D'Oliveiro
In message mailman.720.1289149298.2218.python-l...@python.org, Robert Kern wrote: Everyone here knew exactly what he meant. But if you don’t banana the right tomato, everybody could be grapefruit, right? You know what I mean. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross compiling (i386 from amd64) with distutils

2010-11-07 Thread Jason
On Nov 8, 8:30 am, Martin v. Loewis mar...@v.loewis.de wrote: At a minimum, you should be using the target's python binary. distutils has close-to-none cross-compiling support. Do you know if virtualenv allows installing a Python environment with a different architecture than that of the system

Re: Compare source code

2010-11-07 Thread Grant Edwards
On 2010-11-07, Steve Holden st...@holdenweb.com wrote: On 11/7/2010 10:46 AM, Grant Edwards wrote: On 2010-11-07, Steve Holden st...@holdenweb.com wrote: On 11/7/2010 8:23 AM, Grant Edwards wrote: [...] (I bought 4:3 monitors before they got replaced by cheap 16:8 screens) I think you'll

Re: ANN: PyQt v4.8.1 Released

2010-11-07 Thread Robert Kern
On 2010-11-07 18:53 , Lawrence D'Oliveiro wrote: In messagemailman.720.1289149298.2218.python-l...@python.org, Robert Kern wrote: Everyone here knew exactly what he meant. But if you don’t banana the right tomato, everybody could be grapefruit, right? You know what I mean. And as I

http error 301 for urlopen

2010-11-07 Thread Wenhuan Yu
I tried to open a link with urlopen: import urllib2 alink = http://feeds.nytimes.com/click.phdo?i=ff074d9e3895247a31e8e5efa5253183; f = urllib2.urlopen(alink) print f.read() and got the followinig error: urllib2.HTTPError: HTTP Error 301: The HTTP server returned a redirect error tha t would

Re: Cross compiling (i386 from amd64) with distutils

2010-11-07 Thread Jason
On Nov 8, 8:55 am, Jason jason.hee...@gmail.com wrote: Do you know if virtualenv allows installing a Python environment with a different architecture than that of the system Python install? I suspect not, but maybe there's an option I don't know about. Found a better solution, which is to just

Re: http error 301 for urlopen

2010-11-07 Thread D'Arcy J.M. Cain
On Sun, 7 Nov 2010 19:30:23 -0600 Wenhuan Yu yuwenh...@gmail.com wrote: I tried to open a link with urlopen: import urllib2 alink = http://feeds.nytimes.com/click.phdo?i=ff074d9e3895247a31e8e5efa5253183; f = urllib2.urlopen(alink) print f.read() and got the followinig error:

Re: Compare source code

2010-11-07 Thread Roy Smith
In article ib7ifn$48...@reader1.panix.com, Grant Edwards inva...@invalid.invalid wrote: It's getting really hard to find high-DPI displays on laptops any more. 1600x1200 used to be available on 16 laptop displays, and that looked great. Even my old 15 thinkpad at 1400x1050 wasn't bad. My

Re: http error 301 for urlopen

2010-11-07 Thread Nobody
On Sun, 07 Nov 2010 20:51:50 -0500, D'Arcy J.M. Cain wrote: urllib2.HTTPError: HTTP Error 301: The HTTP server returned a redirect error that would lead to an infinite loop. The last 30x error message was: Moved Permanently I can open the link in browser. Any way to get solve this? Thanks.

Re: functions, list, default parameters

2010-11-07 Thread alex23
m...@distorted.org.uk (Mark Wooding) wrote: And the advantage of all of this typing over ['missing'] is what, precisely? No chance of the sentinel object being accidentally mutated would be the big one for me, but clarity of intent would be a close second. --

Re: Making ActivePython and Python co-exist on Windows

2010-11-07 Thread CWC
On Nov 7, 12:34 pm, Benjamin Kaplan benjamin.kap...@case.edu wrote: ActivePython is the same thing as the normal Python. They just bundle the standard Python 3.1.2 distribution with a couple of extra packages in a convenient installer for you. Thanks, Ben! Based on your response, I decided to

Re: subclassing str

2010-11-07 Thread not1xor1 (Alessandro)
Il 07/11/2010 07:41, Chris Rebert wrote: You could subclass UserString instead of str; all of UserString's methods seem to ensure that instances of the subclass rather than just plain strs or UserStrings are returned. See http://docs.python.org/library/userdict.html#UserString.UserString I'll

Re: http error 301 for urlopen

2010-11-07 Thread John Nagle
On 11/7/2010 5:51 PM, D'Arcy J.M. Cain wrote: On Sun, 7 Nov 2010 19:30:23 -0600 Wenhuan Yuyuwenh...@gmail.com wrote: I tried to open a link with urlopen: import urllib2 alink = http://feeds.nytimes.com/click.phdo?i=ff074d9e3895247a31e8e5efa5253183; f = urllib2.urlopen(alink) print f.read()

[issue10335] tokenize.open_python(): open a Python file with the right encoding

2010-11-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: what about open(.., encoding=fromcookie)? Please don't do that. It remembers me the magical str.encode() method of Python2. I prefer simple API with limited features: if you want to open a Python script, use tokenize.open(), if

[issue10335] tokenize.open_python(): open a Python file with the right encoding

2010-11-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: On Saturday 06 November 2010 17:00:15 you wrote: Note that it is useful for opening any text file with an encoding cookie, not only python source code, so tokenize.open() sounds attractive. Ok, the new patch

[issue6317] winsound.PlaySound doesn't accept non-unicode string

2010-11-07 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I've committed in r86283(py3k). I'll merge this into release31-maint and release27-maint. -- resolution: - fixed stage: - committed/rejected status: open - closed versions: -Python 2.6, Python 3.0

[issue6317] winsound.PlaySound doesn't accept non-unicode string

2010-11-07 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: As for back-porting: I'm not sure this is a bug in 2.7. It just doesn't support Unicode filenames, but that's not (inherently) a bug. In 3.1, I can agree that it's a bug - but we need to preserve the bytes support for compatibility. For

[issue10346] strange arithmetic behaviour

2010-11-07 Thread Alexey Radkov
New submission from Alexey Radkov alexey.rad...@gmail.com: The following excerpt will show the issue: $ python Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type help, copyright, credits or license for more information. 8 * 4 / ( 2 - 7 ) * 6 /

[issue6317] winsound.PlaySound doesn't accept non-unicode string

2010-11-07 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: As for back-porting: I'm not sure this is a bug in 2.7. It just doesn't support Unicode filenames, but that's not (inherently) a bug. In 3.1, I can agree that it's a bug - but we need to preserve the bytes support for

[issue10346] strange arithmetic behaviour

2010-11-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It's not a bug: you're seeing Python's rules for integer division, which do indeed differ from those of (some) other languages when either the divisor or the dividend is negative. For integers x and y, in Python 2.x, x / y gives the floor

[issue10336] test_xmlrpc fails if gzip is not supported by client

2010-11-07 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Sorry, I cannot. I don't know HTTP. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10336 ___

[issue10337] testTanh() of test_math fails on NetBSD 5 i386 3.x

2010-11-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I'm not sure what can reasonably be done about these failures. The Python test is failing because of a deficiency in the system math library. Adding extra code to Python to handle this (making use of TANH_PRESERVES_ZERO_SIGN) is an option,

[issue10297] decimal module documentation is misguiding

2010-11-07 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10297 ___ ___ Python-bugs-list

[issue10297] decimal module documentation is misguiding

2010-11-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Fixed in r86286, r86287, r86288. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10297 ___

[issue6317] winsound.PlaySound doesn't accept non-unicode string

2010-11-07 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I've committed in r86291(release31-maint). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6317 ___

[issue10325] PY_LLONG_MAX co - preprocessor constants or not?

2010-11-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch (against py3k) incorporating your suggestions. Would you be willing to review? [Removing Python 2.6 from versions since it's no longer maintained for non-security issues.) -- keywords: +patch versions: -Python 2.6

[issue10325] PY_LLONG_MAX co - preprocessor constants or not?

2010-11-07 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: Added file: http://bugs.python.org/file19531/issue10325.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10325 ___

[issue10325] PY_LLONG_MAX co - preprocessor constants or not?

2010-11-07 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: Removed file: http://bugs.python.org/file19530/issue10325.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10325 ___

[issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally

2010-11-07 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Just a note for myself when I next update the patch: the 2-tuple returned by defrag needs to be turned into a real result type of its own, and the decode/encode methods on result objects should be tested explicitly. --

[issue7652] Merge C version of decimal into py3k.

2010-11-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: On Wed, Nov 3, 2010 at 3:28 AM, Case Van Horsen rep...@bugs.python.org wrote: Has the cdecimal branch kept up with the hash value changes in 3.2? Not sure; that's a question for Stefan. Is there a still a chance that cdecimal could be

[issue10027] os.lstat/os.stat don't set st_nlink on Windows

2010-11-07 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I found Win32 FileID API. With this library, it seems we can use GetFileInformationByHandleEx before Vista. We can get real file name and hard link count from handle.

[issue10145] float.is_integer is undocumented

2010-11-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Fixed in r86293, r86394, r86295. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10145

[issue10052] Python/dtoa.c:158: #error Failed to find an exact-width 32-bit integer type (FreeBSD 4.11 + gcc 2.95.4)

2010-11-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the patch. This looks fine, in principle. A couple of comments and questions: (1) I think the patch should provide *MIN values alongside the *MAX values (for signed types only, of course). (2) Are we sure that these values are

[issue10226] urlparse example is wrong

2010-11-07 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Fixed the wordings in r86296(py3k), r86297(release31-maint) and r86298(release27-maint). David, for the examples you mentioned, the first one's parsing logic follows the explanation that is written. It is correct. For the second example,

[issue10337] testTanh() of test_math fails on NetBSD 5 i386 3.x

2010-11-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Here is a patch skipping math and cmath tests if TANH_PRESERVES_ZERO_SIGN is 0. -- keywords: +patch Added file: http://bugs.python.org/file19532/skip_tanh_sign.patch ___ Python tracker

[issue10337] testTanh() of test_math fails on NetBSD 5 i386 3.x

2010-11-07 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file19533/skip_tanh_sign-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10337 ___

[issue10337] testTanh() of test_math fails on NetBSD 5 i386 3.x

2010-11-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Commited to Python 3.2 (r86299) after a review of Mark Dickson on IRC. Thanks Mark ;-) -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue2001] Pydoc interactive browsing enhancement

2010-11-07 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I'd actually started typing out the command to commit this before it finally clicked that the patch changes public APIs of the pydoc module in incompatible ways. Sure, they aren't documented, but the fact they aren't protected by an

[issue10337] testTanh() of test_math fails on NetBSD 5 i386 3.x

2010-11-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Nice fix! Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10337 ___ ___

[issue2001] Pydoc interactive browsing enhancement

2010-11-07 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: Added file: http://bugs.python.org/file19534/issue2001_ncoghlan_cleanup.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___

[issue10337] testTanh() of test_math fails on NetBSD 5 i386 3.x

2010-11-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: P.S. Greg, as the owner of the buildbot, do you feel like reporting this upstream? I get the impression that it's easier to do the reporting directly from the NetBSD machine in question... --

[issue10347] regrtest progress counter makes -f option less useful

2010-11-07 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: The regrtest progress counter ([ 1/350]) is very nice but makes it less practical to use the -f option to regrtest. -- components: Tests messages: 120684 nosy: georg.brandl, pitrou priority: low severity: normal status: open title:

[issue10337] testTanh() of test_math fails on NetBSD 5 i386 3.x

2010-11-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: P.S. Greg, as the owner of the buildbot, do you feel like reporting this upstream? I get the impression that it's easier to do the reporting directly from the NetBSD machine in question... I already reported the bug upstream:

[issue10347] regrtest progress counter makes -f option less useful

2010-11-07 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Right. Let's make -f ignore leading [...] in the file :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10347 ___

[issue10329] trace.py and unicode in Python 3

2010-11-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: For the record, the test failure can reproduced by the following: $ LANG=C ./python -m test.regrtest test_imp test_trace [1/2] test_imp [2/2] test_trace /home/antoine/py3k/__svn__/Lib/unittest/case.py:402: ResourceWarning: unclosed file

[issue10337] testTanh() of test_math fails on NetBSD 5 i386 3.x

2010-11-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: NetBSD bug report: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44057 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10337

[issue9561] distutils: set encoding to utf-8 for input and output files

2010-11-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue might be splitted in multiple issue: one issue per file type (eg. Makefile, RPM spec file, etc.). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561

  1   2   >