Re: Expanding a vector by replicating elements individually

2010-09-22 Thread Peter Otten
gburde...@gmail.com wrote: Given m=numpy.array([[1, 2, 3]]) I want to obtain array([[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]]) numpy.array([1,2,3]).repeat(4) array([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]) Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python in Linux - barrier to Python 3.x

2010-09-22 Thread John Nagle
On 9/21/2010 11:42 AM, Ned Deily wrote: In article87zkvbytnk@web.de, de...@web.de (Diez B. Roggisch) wrote: The point is that the distro doesn't care about the python eco system. Which is what I care about, and a lot of people who want to ship software. I don't think that is totally

Re: utf-8 coding sometimes it works, most of the time it don't work.

2010-09-22 Thread Ulrich Eckhardt
Stef Mientki wrote: When running this python application from the command line ( or launched from another Python program), the wrong character encoding (probably windows-1252) is used. Rule #1: If you know the correct encoding, set it yourself. This particularly applies to files you open

Re: Grouping pairs - suggested tools

2010-09-22 Thread Peter Otten
Arnaud Delobelle wrote: I think I would go for the two-step approach of constructing the graph first and then recursively building connected components. It sounds more complicated at first but when you implement it it turns out quite simple: from collections import defaultdict from

Re: This Is International Don’t-Squawk-Like-A -Parrot Day

2010-09-22 Thread Bruno Desthuilliers
Lawrence D'Oliveiro a écrit : Next we need an International Surfin’ Bird day, a day to go around and tell everybody that the bird bird bird, the bird is the word. +1 -- http://mail.python.org/mailman/listinfo/python-list

Re: utf-8 coding sometimes it works, most of the time it don't work.

2010-09-22 Thread Stef Mientki
hello Uli, thanks, I think you hit the nail on it's head, PyScripter indeed changes default encoding but .. On Wed, Sep 22, 2010 at 9:16 AM, Ulrich Eckhardt eckha...@satorlaser.comwrote: Stef Mientki wrote: When running this python application from the command line ( or launched from

Re: Grouping pairs - suggested tools

2010-09-22 Thread Arnaud Delobelle
On Sep 22, 8:30 am, Peter Otten __pete...@web.de wrote: Arnaud Delobelle wrote: I think I would go for the two-step approach of constructing the graph first and then recursively building connected components.  It sounds more complicated at first but when you implement it it turns out quite

Re: creating python daemon ?

2010-09-22 Thread Diez B. Roggisch
vineet daniel vineetdan...@gmail.com writes: On Sep 21, 9:47 pm, de...@web.de (Diez B. Roggisch) wrote: vineet daniel vineetdan...@gmail.com writes: Hi I have succesfully created daemon with python script and as next step I am trying to give input to that python script daemon from Apache

Error installing cx_Oracle

2010-09-22 Thread AMC
Hi, From last months I am using Python for making small but useful tools for my team members. I am doing my development in windows machine and running the program in Solaris machine where Python 2.6.2 is installed. In one of my program file I had to use the module cx_Oracle.For that I have

Life

2010-09-22 Thread saruviel
Life By Daniel Daly A series of, perhaps random thoughts, or if you take the time to try and make some coherent sense of the whole, perhaps something deeper. But probably not. I was inspired to start this task by the book ‘By the Waters of Galilee’ by Fr Luke Fay of Catholic faith.

Re: lists and list item matches (ghost wodgame)

2010-09-22 Thread nn
On Sep 21, 6:39 pm, Baba raoul...@gmail.com wrote: Hi query level: beginner as part of a learning exercise i have written code that: a) asks for a single letter input (assumption: only 1 letter wil be entered) b) adds that letter to list1 and then goes through list2 and checks:     1)

Re: Subprocess does not return for longer-running process

2010-09-22 Thread Nobody
On Tue, 21 Sep 2010 23:54:04 -0700, Dennis Lee Bieber wrote: As your Traceback clearly indicates, the Popen() call has already completed; it's *the os.waitpid() call* that's blocking, but that's entirely to be expected given its defined behavior. If you don't want to wait around for the

Re: how to get partition information of a hard disk with python

2010-09-22 Thread Nobody
On Wed, 22 Sep 2010 00:31:04 +0200, Hellmut Weber wrote: I'm looking for a possibility to access the partiton inforamtion of a hard disk of my computer from within a python program. Have you considered parsing /proc/partitions? -- http://mail.python.org/mailman/listinfo/python-list

HTML6 proposal (Re: sexp xml syntax transformation)

2010-09-22 Thread Xah Lee
cleaned up the previous post. • 〈HTML6, Your HTML/XML Simplified〉 http://xahlee.org/comp/html6.html plain text version follows -- HTML6, Your HTML/XML Simplified Xah Lee, 2010-09-21 Tired of the standard bodies telling us what to do and change

Re: Best way for rotating a matrix of data?

2010-09-22 Thread Nobody
On Tue, 21 Sep 2010 19:38:06 -0700, Raphaël Plasson wrote: Actually, I more precisely extract my 2D array from much higher dimensions data (i.e. 10-20 fields of different data in 3 dimensions of space+1 dimension of time), contained in a hdf5 file. I typically would like to extract arbitrary

Re: Grouping pairs - suggested tools

2010-09-22 Thread MRAB
On 20/09/2010 22:42, Astley Le Jasper wrote: I have a list of tuples that indicate a relationship, ie a is related to b, b is related to c etc etc. What I want to do is cluster these relationships into groups. An item will only be associated with a single cluster. Before I started, I wondered

Re: Expanding a vector by replicating elements individually

2010-09-22 Thread Terry Reedy
On 9/21/2010 11:03 PM, gburde...@gmail.com wrote: Given m=numpy.array([[1, 2, 3]]) I want to obtain array([[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]]) One way I've found to do this is: numpy.reshape(numpy.tile(m,(4,1)),(12,1),'f').T Another way is:

SetGridCursor not working?

2010-09-22 Thread Dani Valverde
Hello! I have a table with some rows and cells (code at the end), and created a function which searches for text inside the cells and returns the row number where the text is (to simplify the example, only English Name is working). Then, it should set the grid cursor focus to that row (I want

Auto size wx.StaticText

2010-09-22 Thread Dani Valverde
Hello! Is there a way to automatically set the size of a wx.StaticText to fit its content? Cheers! Dani -- Daniel Valverde Saubí c/Joan Maragall 37 4 2 17002 Girona Spain Telèfon mòbil: +34651987662 e-mail: dani.valve...@gmail.com http://www.acrocephalus.net http://natupics.blogspot.com Si

Re: Auto size wx.StaticText

2010-09-22 Thread Grant Edwards
On 2010-09-22, Dani Valverde dani.valve...@gmail.com wrote: Is there a way to automatically set the size of a wx.StaticText to fit its content? According to the docs, it should do that by default: http://xoomer.virgilio.it/infinity77/wxPython/Widgets/wx.StaticText.html Window Styles

Re: weird error with python 2.7 installer under windows 7

2010-09-22 Thread Martin v. Loewis
Any ideas? Try running the postinstall script by hand. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Playing sounds at time indexes

2010-09-22 Thread OKB (not okblacke)
I'm looking for an audio library for Python. I googled and found a few, but none of them seem to have a simple way to play a particular sound file from a particular start-time to an end-time. Like, I'd want to load a file and say Play the section of this file from 10.25 seconds to

ctypes

2010-09-22 Thread jay thompson
Hello, I posted in regard to this in the past but it didn't go very far, no ones fault, but I'm again atempting to make this work and could use some help. I would like to use libraw.dll (http://www.libraw.org/ version 0.10) from python and can access all the functions fine and produce images

Re: lists and list item matches (ghost wodgame)

2010-09-22 Thread Baba
On Sep 22, 3:38 pm, nn prueba...@latinmail.com wrote: On Sep 21, 6:39 pm, Baba raoul...@gmail.com wrote: Hi query level: beginner as part of a learning exercise i have written code that: a) asks for a single letter input (assumption: only 1 letter wil be entered) b) adds that

Re: Expanding a vector by replicating elements individually

2010-09-22 Thread Robert Kern
On 9/21/10 10:03 PM, gburde...@gmail.com wrote: Given m=numpy.array([[1, 2, 3]]) I want to obtain array([[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]]) One way I've found to do this is: numpy.reshape(numpy.tile(m,(4,1)),(12,1),'f').T Another way is:

Re: Auto size wx.StaticText

2010-09-22 Thread CM
On Sep 22, 2:38 pm, Grant Edwards inva...@invalid.invalid wrote: On 2010-09-22, Dani Valverde dani.valve...@gmail.com wrote: Is there a way to automatically set the size of a wx.StaticText to fit its content? According to the docs, it should do that by default:    

Re: lists and list item matches (ghost wodgame)

2010-09-22 Thread Baba
On Sep 22, 9:18 pm, Baba raoul...@gmail.com wrote: On Sep 22, 3:38 pm, nn prueba...@latinmail.com wrote: On Sep 21, 6:39 pm, Baba raoul...@gmail.com wrote: Hi query level: beginner as part of a learning exercise i have written code that: a) asks for a single letter input

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-22 Thread Steven D'Aprano
On Tue, 21 Sep 2010 00:51:20 -0700, Dennis Lee Bieber wrote: On 21 Sep 2010 05:01:45 GMT, Steven D'Aprano steve-remove-t...@cybersource.com.au declaimed the following in gmane.comp.python.general: Hey, that would be an *awesome* google bombing project... to get lmgtfy to come up as the

Re: Down with tinyurl!

2010-09-22 Thread Steven D'Aprano
On Mon, 20 Sep 2010 23:17:54 -0700, Dennis Lee Bieber wrote: On Mon, 20 Sep 2010 20:12:01 -0500, John Bokma j...@castleamber.com declaimed the following in gmane.comp.python.general: I never saw the point of the whole X-No-Archive: Yes thing. What happens if I quote such a message? It's

Re: Too much code - slicing

2010-09-22 Thread Steven D'Aprano
On Tue, 21 Sep 2010 08:17:00 +, Duncan Booth wrote: I guess you have worked hard to forget the and-or hack. It was actually: condition and true-clause or false-clause so its not quite the same pattern. So I did. Oops. Thanks for the correction. -- Steven --

Re: Too much code - slicing

2010-09-22 Thread Steven D'Aprano
On Tue, 21 Sep 2010 16:17:48 +0200, Antoon Pardon wrote: On Tue, Sep 21, 2010 at 12:07:07AM +, Steven D'Aprano wrote: On Mon, 20 Sep 2010 19:28:49 +0200, Antoon Pardon wrote: Not necessarily. Some of us have the impression that Guido deliberatly chose an ugly format for the ternary

Re: data structure suggestion (native python datatypes or sqlite; compound select)

2010-09-22 Thread Vlastimil Brom
2010/9/19 Dennis Lee Bieber wlfr...@ix.netcom.com: On Sat, 18 Sep 2010 23:00:25 +0200, Vlastimil Brom vlastimil.b...@gmail.com declaimed the following in gmane.comp.python.general: Thank you very much for detailed hints, I see, I should have mention the specification with my initial post...

Re: Subprocess does not return for longer-running process

2010-09-22 Thread Lawrence D'Oliveiro
In message pan.2010.09.22.16.38.25.844...@nowhere.com, Nobody wrote: And I can't think of any reason why you should use os.waitpid() or similar; use the .wait() method. I have used WNOHANG to poll for completion of a subprocess while providing progress updates to the user. --

Re: Too much code - slicing

2010-09-22 Thread Steven D'Aprano
On Tue, 21 Sep 2010 12:26:29 -0400, Andreas Waldenburger wrote: On Sat, 18 Sep 2010 19:09:33 -0700 (PDT) Carl Banks pavlovevide...@gmail.com wrote: On Sep 17, 1:01 pm, Andreas Waldenburger use...@geekmail.invalid wrote: On Thu, 16 Sep 2010 16:20:33 -0400 AK andrei@gmail.com wrote:

Python Macros's Not the Power in OOo they should be ?

2010-09-22 Thread flebber
I have recently been looking at openoffice because I saw it had support to use python Macro's. I thought this would provide OOo with a great advantage a fully powerful high level language as compared to VBA in Excel. I have found few docs on the subject.

Re: Python Macros's Not the Power in OOo they should be ?

2010-09-22 Thread flebber
On Sep 23, 10:41 am, flebber flebber.c...@gmail.com wrote: I have recently been looking at openoffice because I saw it had support to use python Macro's. I thought this would provide OOo with a great advantage a fully powerful high level language as compared to VBA in Excel. I have found few

Re: Down with tinyurl!

2010-09-22 Thread John Bokma
Steven D'Aprano steve-remove-t...@cybersource.com.au writes: You know, I'd give my right arm -- well, perhaps somebody else's right arm -- for the opportunity to some day to be interviewing an ex-RIAA executive, just so I can say: I see from your CV that you took millions of customers and

Re: Too much code - slicing

2010-09-22 Thread John Bokma
Steven D'Aprano steve-remove-t...@cybersource.com.au writes: For completeness sake: code = side == 'l' ? dir[int(num):] : dir[:-1*int(num)] code = if side == 'l' then dir[int(num):] else dir[:-1*int(num)] code = side == 'l' if dir[int(num):] else dir[:-1*int(num)] code = dir[int(num):] if

Re: Too much code - slicing

2010-09-22 Thread Seebs
On 2010-09-23, Steven D'Aprano steve-remove-t...@cybersource.com.au wrote: Yes, it certainly is. Describing it as an ugly format is also a matter of taste -- taste which in my opinion simply isn't justified by anything other than familiarity. It may not be convincing to other people, but the

Re: Error installing cx_Oracle

2010-09-22 Thread James Mills
On Wed, Sep 22, 2010 at 9:35 PM, AMC arunmoha...@gmail.com wrote: Hi, From last months I am using Python for making small but useful tools for my team members. I am doing my development in windows machine and running the program in Solaris machine where Python 2.6.2 is installed. In one of

Re: Python Macros's Not the Power in OOo they should be ?

2010-09-22 Thread Lawrence D'Oliveiro
In message 4d76a2ad-bf85-472e-8c63-ef16f320a...@t11g2000vbc.googlegroups.com, flebber wrote: Has anyone had much success with python macro's. Or developing powerful macro's in an language? I did an application for my own use recently, involving automatically generating invoices in editable

Re: Too much code - slicing

2010-09-22 Thread Steven D'Aprano
On Thu, 23 Sep 2010 01:49:44 +, Seebs wrote: But I do think it's unfair to dismiss it as purely a matter of baby duck syndrome. Consistency in ordering of corresponding idioms seems a reasonable goal. I don't see anyone bitching about: for x in seq: if x: f(x) vs [f(x)

Re: Too much code - slicing

2010-09-22 Thread Seebs
On 2010-09-23, Steven D'Aprano steve-remove-t...@cybersource.com.au wrote: On Thu, 23 Sep 2010 01:49:44 +, Seebs wrote: But I do think it's unfair to dismiss it as purely a matter of baby duck syndrome. Consistency in ordering of corresponding idioms seems a reasonable goal. I don't see

Re: Too much code - slicing

2010-09-22 Thread John Bokma
Seebs usenet-nos...@seebs.net writes: I dunno. I like the next if /^$/ idiom, I don't (as a Perl programmer), I prefer: $line =~ /^$/ and next; Or: $line ne '' or next; which I read as: line must not be empty -- John Bokma j3b

Re: Too much code - slicing

2010-09-22 Thread Seebs
On 2010-09-23, John Bokma j...@castleamber.com wrote: Seebs usenet-nos...@seebs.net writes: I dunno. I like the next if /^$/ idiom, I don't (as a Perl programmer), I prefer: Huh, those are actually nicer. I didn't know that was possible; it wouldn't have occurred to me to try to put next

Re: lists and list item matches (ghost wodgame)

2010-09-22 Thread cbr...@cbrownsystems.com
On Sep 22, 3:39 pm, Baba raoul...@gmail.com wrote: On Sep 22, 9:18 pm, Baba raoul...@gmail.com wrote: On Sep 22, 3:38 pm, nn prueba...@latinmail.com wrote: On Sep 21, 6:39 pm, Baba raoul...@gmail.com wrote: Hi query level: beginner as part of a learning exercise i have

Re: creating python daemon ?

2010-09-22 Thread vineet daniel
On Sep 22, 2:20 pm, de...@web.de (Diez B. Roggisch) wrote: vineet daniel vineetdan...@gmail.com writes: On Sep 21, 9:47 pm, de...@web.de (Diez B. Roggisch) wrote: vineet daniel vineetdan...@gmail.com writes: Hi I have succesfully created daemon with python script and as next step I

[issue1491] BaseHTTPServer incorrectly implements response code 100

2010-09-22 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: - orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1491 ___ ___

[issue1595365] Urllib2 user-agent header added by an opener is frozen

2010-09-22 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: This is still a valid bug. -- assignee: - orsenthil resolution: - accepted stage: unit test needed - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1595365

[issue8998] add crypto routines to stdlib

2010-09-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: geremy condra wrote: geremy condra debat...@gmail.com added the comment: The pyOpenSSL port to Python3 is closing in on completion. Jean-Paul is planning for an alpha release next month. Do you know if he's looking for help with

[issue9918] Installation make test, two fails if non-ascii path

2010-09-22 Thread ingemar
New submission from ingemar inge...@sijohansson.com: I am using Kubuntu 10.4 on a no-brand box with a 64-bit CPU. I use my own download and install of Python 3.1, SIP and PyQt. The default download directory as set up by the Kubuntu install is /home/ingemar/Hämtningar, where Hämtningar is

[issue678250] test_mmap failling on AIX

2010-09-22 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: After Antoine commit concerning issue2643, here is a new patch (just removing the changes in close). Could you commit it? -- Added file: http://bugs.python.org/file18963/patch_mmap_flush_updated.diff

[issue678264] test_resource fails when file size is limited

2010-09-22 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: The ideal would be to check that RLIMIT_FSIZE corresponds to the ulimit as it has been suggested by Neal Norwitz in msg14345, but since the value reported by ulimit has a different unit for each platform, that would be quite a lot

[issue1675951] Performance for small reads and fix seek problem

2010-09-22 Thread Florian Festi
Florian Festi florianfe...@users.sourceforge.net added the comment: Stupid me! I ran the tests against my systems gzip version (Py 3.1). The performance issue is basically fixed by rev 77289. Performance is even a bit better that my original patch by may be 10-20%. The only test case where it

[issue1675951] Performance for small reads and fix seek problem

2010-09-22 Thread Florian Festi
Changes by Florian Festi florianfe...@users.sourceforge.net: Added file: http://bugs.python.org/file18965/0002-Avoid-the-need-of-seek-ing-on-the-file-read-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1675951

[issue730467] Not detecting AIX_GENUINE_CPLUSPLUS

2010-09-22 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: I can confirm this is still a problem in py3k for AIX 5.3 and AIX 6.1. The file /usr/lpp/xlC/include/load.h does not exist anymore; it is now /usr/include/load.h. The proposed patch would only create a problem for very old versions

[issue9919] gdbinit lineno result is one line in excess

2010-09-22 Thread qpatata
New submission from qpatata qpat...@gmail.com: Thanks a lot to all python teams for your excel.lent work. When latest version of gdbinit macros is used to debug with gdb a python 2.4 session, the result from lineno macro seems one line more than the correct one. If we compare the gdb macro:

[issue730467] Not detecting AIX_GENUINE_CPLUSPLUS

2010-09-22 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: It should also be changed in Python/dynload_aix.c: Index: Python/dynload_aix.c === --- Python/dynload_aix.c(révision 84964) +++ Python/dynload_aix.c

[issue9918] Installation make test, two fails if non-ascii path

2010-09-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I'm amazed you only got two failures. Victor has been doing a lot of work in 3.2 trying to make non-ascii paths work reliably. -- nosy: +haypo, r.david.murray ___ Python tracker

[issue9918] Installation make test, two fails if non-ascii path

2010-09-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: oh, wait, victor's work is for undecodable non-ascii characters. I think flox did the work on decodable non-ascii characters, and that may well have gone into 3.1. -- nosy: +flox ___ Python

[issue9918] Installation make test, two fails if non-ascii path

2010-09-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: See issue7606 and issue7605: both fixed in SVN. All is needed is a new 3.1.x release :) -- nosy: +pitrou resolution: - out of date status: open - closed versions: +Python 3.2 ___ Python tracker

[issue9917] resource max value represented as signed when should be unsigned

2010-09-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: And here is Martin's summary of the issue: I think we really should create new issues for any remaining problems. AFAICT, the remaining problems are: - resource.RLIM_INFINITY is -1 on Linux, when it is meant to be a really large value

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2010-09-22 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: In msg108954, I believe belopolsky is mistaken in stating that it would be easy to simply provide custom __getinitargs__ or __reduce__ to support it. It appears __getinitargs__ does not work on Python 2.5 or Python 2.7. Exceptions of the

[issue7296] OverflowError: signed integer is greater than maximum on mips64

2010-09-22 Thread jasper
jasper jas...@humppa.nl added the comment: FYI, the issue has been fixed now in the mips64 port of OpenBSD by replacing the previous/old floating point completion code with a C interface to the MI softfloat code, implementing all MIPS IV specified floating point operations. --

[issue9920] test_cmath on atan fails on AIX

2010-09-22 Thread Sébastien Sablé
New submission from Sébastien Sablé sa...@users.sourceforge.net: test_cmath will fail with the following error on AIX: == FAIL: test_specific_values (test.test_cmath.CMathTests)

[issue9920] test_cmath on atan fails on AIX

2010-09-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the report. This looks like it's probably a bug (not a particularly serious one, but worth reporting) on AIX. The 'tanh' configure test diagnoses a similar wrong-sign-of-zero problem on FreeBSD; it looks as though AIX is happy

[issue9920] test_cmath on atan fails on AIX

2010-09-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: P.S. Was the test with a debug build of Python? If not, could you see if the test failure still occurs with a debug build (i.e., when --with-pydebug is passed as a configure argument)? That would help eliminate compiler optimization bugs

[issue9920] test_cmath on atan fails on AIX

2010-09-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Sorry---one more question: could you tell me what the following gives on the AIX machine? Python 2.7 (r27:82500, Aug 15 2010, 14:21:15) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type help, copyright, credits or license for more

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2010-09-22 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: After some further reading, I found that PEP-352 (http://www.python.org/dev/peps/pep-0352/) explicitly states that Including programmatic information (e.g., an error code number) should be stored as a separate attribute in a subclass [and

[issue9921] os.path.join('x','') behavior

2010-09-22 Thread Radu Grigore
New submission from Radu Grigore radugrig...@gmail.com: The docs say that the return value is the concatenation of path1, and optionally path2, etc., with exactly one directory separator (os.sep) inserted between components, unless path2 is empty. But os.path.join('x','') returns 'x/' in

[issue9915] speeding up sorting with a key

2010-09-22 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Attached is my script for running a more comprehensive battery of speed tests. The script itself requires Python 2.6 with argparse installed or Python 2.7 (which includes argparse). For obvious reasons, please make sure that

[issue9919] gdbinit lineno result is one line in excess

2010-09-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Can you show an example which shows an incorrect lineno? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9919

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2010-09-22 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Sep 22, 2010 at 9:39 AM, Jason R. Coombs rep...@bugs.python.org wrote: .. It appears __getinitargs__ does not work on Python 2.5 or Python 2.7. Yes, __getinitargs__ is only used for old style classes. I was

[issue9801] Can not use append/extend to lists in a multiprocessing manager dict

2010-09-22 Thread Ask Solem
Ask Solem a...@opera.com added the comment: Maybe surprising but not so weird if you think about what happens behind the scenes. When you do x = man.list() x.append({}) You send an empty dict to the manager to be appended to x when do: x[0] {} you receive a local copy of

[issue7707] multiprocess.Queue operations during import can lead to deadlocks

2010-09-22 Thread Ask Solem
Ask Solem a...@opera.com added the comment: I created a small doc patch for this (attached). -- keywords: +needs review, patch nosy: +asksol versions: +Python 3.1 -Python 2.6 Added file: http://bugs.python.org/file18967/multiprocessing-issue7707.patch

[issue9919] gdbinit lineno result is one line in excess

2010-09-22 Thread qpatata
qpatata qpat...@gmail.com added the comment: Hello, Thanks for your colaboration. Starting by the following python file, called prueba.py: cat prueba.py import time def bar(): time.sleep(10); print hello; def foo(): while True: bar(); foo(); Open a gdb session with

[issue9921] os.path.join('x','') behavior

2010-09-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Since changing the implementation would be a backward incompatible behavior change to a behavior that has existed for a long time, it's the docs that should be updated. -- assignee: - d...@python components: +Documentation

[issue9916] errno module is missing some symbols

2010-09-22 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: r84966 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9916 ___

[issue1462440] socket and threading: udp multicast setsockopt fails

2010-09-22 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: I tested it on a Windows XP box, and encountered the same problem. The error is raised because Windows XP requires the socket to be bound before calling setsockopt(IPPROTO_IP, IP_ADD_MEMBERSHIP, mreq). So calling bind() before

[issue9922] subprocess.getstatusoutput and bytes

2010-09-22 Thread geremy condra
New submission from geremy condra debat...@gmail.com: It looks like subprocess.getstatusoutput on 3.2a1 tries to coerce to UTF-8, which fails when dealing with bytes. This demonstrates the behavior nearly all the time for me on Ubuntu 10.04: import subprocess subprocess.getstatusoutput('dd

[issue9621] Graphviz output for 2to3 fixer patterns

2010-09-22 Thread Matt Bond
Matt Bond gmattb...@gmail.com added the comment: As requested, attached is the output for the fix_buffer fixer, as an example of the kind of output this patch can produce. -- Added file: http://bugs.python.org/file18968/fix_buf_pytree_1.png ___

[issue9919] gdbinit lineno result is one line in excess

2010-09-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: OK, I reproduce the issue. It is now clear to me as well that r39492 was slightly wrong: the replacement of break should avoid to execute the end of the loop. The following patch fixes the issue for me, can someone with better gdb

[issue1257] atexit errors should result in nonzero exit code

2010-09-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: exit code = 128 + # of failed atexits I don't agree with the feature. Do we need something so complex? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue9621] Graphviz output for 2to3 fixer patterns

2010-09-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: When I was working with 2to3 this summer I was running it via python3, so I think the patch should work Code in the patch uses print as a keyword (2.x), not a function (3.x). How does that work? however, if I've submitted it to the wrong

[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-22 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: -- resolution: - fixed status: open - closed versions: -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9552

[issue1491804] Simple slice support for list.sort() and .reverse()

2010-09-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: In fact, I find the proposed syntax *less* obvious than the slice syntax, for sorted. IOW, I'd be -1 on adding these to sorted. The potentially useful case is between l[a:b] = sorted(l[a:b}) vs l.sort(start=a, stop=b) where

[issue9923] mailcap module may will not work on non-POSIX platforms if MAILCAPS env variable is set

2010-09-22 Thread Gregory Nofi
New submission from Gregory Nofi crackityjones200...@yahoo.com: mailcap.getcaps() has a call to mailcap.listmailcapfiles(), which returns a list of all mailcap files found on the system. listmailcapfiles() first looks for the MAILCAPS environment variable. If it exists, it converts the string

[issue9923] mailcap module may will not work on non-POSIX platforms if MAILCAPS env variable is set

2010-09-22 Thread Gregory Nofi
Changes by Gregory Nofi crackityjones200...@yahoo.com: Added file: http://bugs.python.org/file18970/mailcap_py3k.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9923 ___

[issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

2010-09-22 Thread Gregory Nofi
Gregory Nofi crackityjones200...@yahoo.com added the comment: Fixing typo in title -- title: mailcap module may will not work on non-POSIX platforms if MAILCAPS env variable is set - mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

[issue9864] email.utils.{parsedate, parsedate_tz} should have better return types

2010-09-22 Thread Jeffrey Finkelstein
Jeffrey Finkelstein jeffrey.finkelst...@gmail.com added the comment: Where does email6 live? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9864 ___

[issue9801] Can not use append/extend to lists in a multiprocessing manager dict

2010-09-22 Thread Alex
Alex alex.gay...@gmail.com added the comment: It should be documented though. Similar scenario in the Django docs: http://docs.djangoproject.com/en/1.2/topics/http/sessions/#when-sessions-are-saved -- nosy: +alex ___ Python tracker

[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2010-09-22 Thread mike bayer
New submission from mike bayer mike...@zzzcomputing.com: Copying this bug from the pysqlite tracker, at http://code.google.com/p/pysqlite/issues/detail?id=21 , as the issue has been opened for two days with no reply. (side node - should sqlite3 bugs be reported here or on the pysqlite tracker

[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2010-09-22 Thread mike bayer
mike bayer mike...@zzzcomputing.com added the comment: My own comment here is that I'm supposing the late BEGIN behavior is to cut down on SQLite's file locking.I think a way to maintain that convenience for most cases, while allowing the stricter behavior that makes SERIALIZABLE