Re: Using threads for audio computing?

2014-05-12 Thread Chris Angelico
On Mon, May 12, 2014 at 3:54 PM, lgabiot lgab...@hotmail.com wrote: So back to my original question: A Queue and two threads (producer/consumer) seems a good answer to my problem, or is there a better way to solve it? (again, I'm really a beginner, so I made up this solution, but really wonder

Re: Using threads for audio computing?

2014-05-12 Thread lgabiot
Le 12/05/14 07:58, Chris Angelico a écrit : Well, the first thing I'd try is simply asking for more data when you're ready for it - can you get five seconds' of data all at once? Obviously this won't work if your upstream buffers only a small amount, in which case your thread is there to do

Re: Using threads for audio computing?

2014-05-12 Thread Stefan Behnel
lgabiot, 12.05.2014 07:33: Le 11/05/14 17:40, lgabiot a écrit : I guess if my calculation had to be performed on a small number of samples (i.e. under the value of the Pyaudio buffer size (2048 samples for instance), and that the calculation would last less than the time it takes to get the

ANN: Cerridwen 1.0c4 (initial release)

2014-05-12 Thread leslie . polzer
Dear Python friends, today I'm proud to be ANNOUNCING: The initial release of a new package, named Cerridwen (1.0c4). PyPI entry: https://pypi.python.org/pypi/cerridwen What gives? The author perceives a lack of modern open source software providing high quality planetary data that is

Re: Using threads for audio computing?

2014-05-12 Thread lgabiot
Le 12/05/14 08:13, Stefan Behnel a écrit : This sounds like a use case for double buffering. Use two buffers, start filling one. When it's full, switch buffers, start filling the second and process the first. When the second is full, switch again. Note that you have to make sure that the

Re: parsing multiple root element XML into text

2014-05-12 Thread Peter Otten
Percy Tambunan wrote: On Friday, May 9, 2014 4:02:42 PM UTC+7, Chris Angelico wrote: On Fri, May 9, 2014 at 6:59 PM, Percy Tambunan percy.tambu...@gmail.com wrote: Hai, I would like to parse this multiple root element XML Easy fix might be to wrap it in root and /root, which will

Re: Fortran (Was: The does Python have variables? debate)

2014-05-12 Thread Alain Ketterlin
Mark H Harris harrismh...@gmail.com writes: On 5/11/14 12:05 PM, Alain Ketterlin wrote: Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on steroids. Its amazing as a dynamic language, and its fast, like lightning fast as well as multiprocessing (parallel processing) at its

Re: Plotting multiple datasets with gnuplot

2014-05-12 Thread s . c . wouters
On Friday, October 9, 2009 12:12:54 PM UTC+2, Gabriel Genellina wrote: En Fri, 09 Oct 2009 06:36:45 -0300, Rob Garrett rgagarr...@gmail.com escribiï¿oe: I'm trying to get gnuplot to display multiple data series on a single plot using gnuplot in python. I've searched around and haven't

Re: Fortran

2014-05-12 Thread Mark Lawrence
On 12/05/2014 03:28, Steven D'Aprano wrote: On Mon, 12 May 2014 01:27:17 +0100, Mark Lawrence wrote: On 12/05/2014 00:51, Steven D'Aprano wrote: Cars are standardized -- there are basically two types, manuals and automatics. Sadly they can still go wrong due to modern engineering

Re: Using threads for audio computing?

2014-05-12 Thread lgabiot
Le 12/05/14 10:14, lgabiot a écrit : So if I follow you, if the Pyaudio part is Non-blocking there would be a way to make it work without the two threads things. I'm back to the Pyaudio doc, and try to get my head around the callback method, which might be the good lead. So far, if I

Re: Error while calling round() from future.builtins

2014-05-12 Thread Preethi
On Saturday, May 10, 2014 5:26:56 PM UTC+5:30, Steven D'Aprano wrote: On Sat, 10 May 2014 04:39:05 -0700, Preethi wrote: Hi, I am new to python. I am getting an error AttributeError: type object 'Decimal' has no attribute 'from_float' when I run the following in python

Re: PyPy updated

2014-05-12 Thread km
I tried compiling pandas on pypy 2.3 but it gave error as follows numpy/core/src/multiarray/scalarapi.c:742:16: error: 'PyUnicodeObject' has no member named 'str' uni-str[length] = 0; ^ numpy/core/src/multiarray/scalarapi.c:743:16: error: 'PyUnicodeObject' has no

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 11/05/14 08:56, Ross Gayler wrote: It looks to me as though 32 and 64 bit versions of Python on 64 bit Windows are both really 32 bit Python, differing only in how they interact with Windows. No! Pointers are 64 bit, Python integers (on Python 2.x) are 32 bit. Microsoft decided to use a

Re: Fortran

2014-05-12 Thread Grant Edwards
On 2014-05-12, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 12 May 2014 00:51:01 +0100, MRAB wrote: On 2014-05-12 00:15, Steven D'Aprano wrote: The F and J keys have F and J printed on them instead of G and K. They're also in slightly different positions, offset one

Re: Fortran

2014-05-12 Thread alister
On Sun, 11 May 2014 20:14:14 -0400, Roy Smith wrote: In article mailman.9900.1399852263.18130.python-l...@python.org, MRAB pyt...@mrabarnett.plus.com wrote: On 2014-05-12 00:15, Steven D'Aprano wrote: On Sun, 11 May 2014 14:43:19 -0400, Roy Smith wrote: In article

Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Mark Lawrence
This was *NOT* written by our resident unicode expert http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ Posted as I thought it would make a rather pleasant change from interminable threads about names vs values vs variables vs objects. -- My fellow Pythonistas, ask not what our

a better way to operate svn with python(better than pysvn)?

2014-05-12 Thread xs . nepaul
-- https://mail.python.org/mailman/listinfo/python-list

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
Hi Ian, thank you for your help. Yes that is the book by Vineeth J Nair. At the top of page 12, at step 1 it says : 1.Download the latest tarball from https://pypi.python.org/packages/source/b/beautifulsoup4/. So yes, the version the book is dealing with is beautiful soup 4. I am using Pyhon

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
The version of Python the book seems to be referring to is 2.7, re: bottom of page 10- 'Pick the Path variable and add the following section to the Path variable: ;C:\PythonXY for example C:\Python 27' The version of Beautiful Soup seems to be Beautiful Soup 4 as at the top of page 12 it

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
Thank you for your advice. I did buy a book on Python, 'Hello Python' but the code in it wouldn't run, so I returned it to the shop for a refund. I am going to visit the local library to see if they have any books on Python. I am familiar with Java and Pascal, and looking at a few You tubes on

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
Dear Ian, The book does recommend to use Python 2.7 (see bottom line of page 10). The book also recommends to use Beautiful Soup 4. You are right that in that I have placed the unzipped BS4 folder within a folder, and I therefore removed the contents of the inner folder and transferred them to

Re: NumPy, SciPy, Python 3X Installation/compatibility issues

2014-05-12 Thread Joseph Martinot-Lagarde
Le 10/05/2014 19:07, esaw...@gmail.com a écrit : Hi All-- Let me state at the start that I am new to Python. I am moving away from Fortran and Matlab to Python and I use all different types of numerical and statistical recipes in my work. I have been reading about NumPy and SciPy and could

Re: How can this assert() ever trigger?

2014-05-12 Thread Joseph Martinot-Lagarde
Le 10/05/2014 17:24, Albert van der Horst a écrit : I have the following code for calculating the determinant of a matrix. It works inasfar that it gives the same result as an octave program on a same matrix. / def determinant(

Re: Why isn't my re.sub replacing the contents of my MS Word file?

2014-05-12 Thread scottcabit
On Friday, May 9, 2014 8:12:57 PM UTC-4, Steven D'Aprano wrote: Good: fStr = re.sub(b'#x2012', b'-', fStr) Doesn't work...the document has been verified to contain endash and emdash characters, but this does NOT replace them. Better: fStr =

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread alister
On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: This was *NOT* written by our resident unicode expert http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ Posted as I thought it would make a rather pleasant change from interminable threads about names vs values vs variables

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Ian Kelly
On Mon, May 12, 2014 at 11:47 AM, alister alister.nospam.w...@ntlworld.com wrote: On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: This was *NOT* written by our resident unicode expert http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ Posted as I thought it would make a

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Simon Evans
I did download the latest version of Beautiful Soup 4 from the download site, as the book suggested. -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread MRAB
On 2014-05-12 19:31, Ian Kelly wrote: On Mon, May 12, 2014 at 11:47 AM, alister alister.nospam.w...@ntlworld.com wrote: On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: This was *NOT* written by our resident unicode expert http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/

Re: NumPy, SciPy, Python 3X Installation/compatibility issues

2014-05-12 Thread Sturla Molden
esaw...@gmail.com wrote: 4.In the long run, would it be better to use UNIX instead of Windows, if I were to use Python for all of my research? Thanks in advance. EK For scientific computing, a UNIX or Linux system is clearly preferable. Most of the scientific computing software is built

Re: [Twisted-web] Twisted 14.0.0 Release Announcement

2014-05-12 Thread Glyph
On May 12, 2014, at 4:07 AM, HawkOwl hawk...@atleastfornow.net wrote: Twisted Agent can also now do HTTPS hostname verification. I feel that it's important to note that Twisted Web's client Agent *does* do HTTPS hostname verification by default; you don't need to turn it on ;). -glyph--

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-12 Thread Ian Kelly
On Mon, May 12, 2014 at 10:35 AM, Simon Evans musicalhack...@yahoo.co.uk wrote: Dear Ian, The book does recommend to use Python 2.7 (see bottom line of page 10). The book also recommends to use Beautiful Soup 4. You are right that in that I have placed the unzipped BS4 folder within a

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Ian Kelly
On Mon, May 12, 2014 at 1:42 PM, MRAB pyt...@mrabarnett.plus.com wrote: How about checking sys.stdin.mode and sys.stdout.mode? Seems to work, but I notice that the docs only define the mode attribute for the FileIO class, which sys.stdin and sys.stdout are not instances of. --

SQLAlchemy - web framework ?

2014-05-12 Thread flebber
If I want to use SQLAlchemy as my ORM what would be the best option for a web framework? It appears the general advice regarding Django is to do it the Django way and use the django ORM and change it out for SQLAlchemy. That to me limited knowledge leaves flask, pyramid and turbogears 2. So if

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 12/05/14 15:42, Sturla Molden wrote: - A one-dimensional NumPy array with dtype np.float64 can keep 16 GB of data before a 32 bit index is too small and Python starts to use long. A two-dimensional NumPy array with dtype np.float64 can keep 256 GB of data before a 32 bit index is too small.

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 4:31 AM, Ian Kelly ian.g.ke...@gmail.com wrote: Just because his code sucks doesn't mean he's wrong about the state of Unicode and UNIX in Python 3. Uhm... I think wrongness of code is generally fairly indicative of wrongness of thinking :) If I write a rant about how

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 11/05/14 08:56, Ross Gayler wrote: Is that true?I have spent a couple of hours searching for a definitive description of the difference between the 32 and 64 bit versions of Python for Windows and haven't found anything. Why do you care if a Python int object uses 32 or 64 bits internally?

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread MRAB
On 2014-05-13 00:41, Sturla Molden wrote: On 12/05/14 15:42, Sturla Molden wrote: - A one-dimensional NumPy array with dtype np.float64 can keep 16 GB of data before a 32 bit index is too small and Python starts to use long. A two-dimensional NumPy array with dtype np.float64 can keep 256 GB

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 10:05 AM, Sturla Molden sturla.mol...@gmail.com wrote: On 11/05/14 08:56, Ross Gayler wrote: Is that true?I have spent a couple of hours searching for a definitive description of the difference between the 32 and 64 bit versions of Python for Windows and haven't found

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 13/05/14 02:09, Chris Angelico wrote: Sometimes you just want to confirm. :) Or maybe you want your program to be able to detect which it's on. There are ways of doing both, but sys.maxint isn't one of them, as it's specific to the int-long promotion of Py2. The OPs main mistake, I guess,

Re: SQLAlchemy - web framework ?

2014-05-12 Thread Iuri
I don't know what exactly you mean with wanted to not build it all myself, but Flask is great with SQLAlchemy. You have the Flask-SQLAlchemy extension and it has a lot of other integrations, like Flask-Admin. You don't have to fear flask to bigger projects. To be honest, I prefer it instead of

Re: SQLAlchemy - web framework ?

2014-05-12 Thread Ben Finney
flebber flebber.c...@gmail.com writes: If I want to use SQLAlchemy as my ORM what would be the best option for a web framework? It appears the general advice regarding Django is to do it the Django way and use the django ORM and change it out for SQLAlchemy. You don't say any more about

Re: SQLAlchemy - web framework ?

2014-05-12 Thread Roy Smith
In article 17149f49-bb71-4c97-9d07-d80766b93...@googlegroups.com, flebber flebber.c...@gmail.com wrote: If I want to use SQLAlchemy as my ORM what would be the best option for a web framework? It appears the general advice regarding Django is to do it the Django way and use the django

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Steven D'Aprano
On Mon, 12 May 2014 17:47:48 +, alister wrote: On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: This was *NOT* written by our resident unicode expert http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ Posted as I thought it would make a rather pleasant change from

Re: SQLAlchemy - web framework ?

2014-05-12 Thread Sayth Renshaw
I am saying 'do it myself' in that with flask that provide a small base and then all functionality is added by me directly, with the assistance of community modules. Compared to Django whose developers have created an integrated set of defaults with more functionality standard, which is good if

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 11:18 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Reading Armin's post, I think that all that is needed to simplify his Python 3 version is: - have a bytes version of sys.argv (bargv? argvb?) and read the file names from that; argb? :) - have a

Re: a better way to operate svn with python(better than pysvn)?

2014-05-12 Thread alex23
On 13/05/2014 1:16 AM, xs.nep...@gmail.com wrote: ... Rather than just send an empty message, why not explain what you don't like about pysvn so that someone could provide more pertinant advice? But since you didn't: https://pypi.python.org/pypi?%3Aaction=searchterm=svnsubmit=search --

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Mark H Harris
On 5/12/14 8:18 PM, Steven D'Aprano wrote: Unicode is hard, not because Unicode is hard, but because of legacy problems. Yes. To put a finer point on that, Unicode (which is only a specification constantly being improved upon) is harder to implement when it hasn't been on the design board

Re: a better way to operate svn with python(better than pysvn)?

2014-05-12 Thread Mark H Harris
On 5/12/14 10:16 AM, xs.nep...@gmail.com wrote: {nothing} huh? -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Mark Lawrence
On 13/05/2014 02:18, Steven D'Aprano wrote: On Mon, 12 May 2014 17:47:48 +, alister wrote: On Mon, 12 May 2014 16:19:17 +0100, Mark Lawrence wrote: This was *NOT* written by our resident unicode expert http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ Posted as I thought it

Re: Why isn't my re.sub replacing the contents of my MS Word file?

2014-05-12 Thread Rustom Mody
On Monday, May 12, 2014 11:05:53 PM UTC+5:30, scott...@gmail.com wrote: On Friday, May 9, 2014 8:12:57 PM UTC-4, Steven D'Aprano wrote: fStr = fStr.replace(b'#x2012', b'-') Still doesn't work Best: # Untested fStr =

Simple Function Decorator Sample Snippet

2014-05-12 Thread Mark H Harris
hi folks, I've come up with a simple snippet that intends to explain the concept of decorations without an article (for on app help), while being succinct and concise, while not being overly complicated. Does this work? I have another one coming for args, similar, if this works... comments

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Rustom Mody
On Tuesday, May 13, 2014 6:48:35 AM UTC+5:30, Steven D'Aprano wrote: On Mon, 12 May 2014 17:47:48 +, alister wrote: Surely those example programs are not the pythonoic way to do things or am i missing something? Feel free to show us your version of cat for Python then. Feel free

Re: SQLAlchemy - web framework ?

2014-05-12 Thread flebber
Roy.that is interesting that you can use mongoengine. Recent google results such as seem to assert there are a lot of inherent risk in swapping out components, though I may be misinterpreting it. http://www.slideshare.net/daikeren/tradeoffs-of-replacing-core-components Sayth --

Re: Fortran (Was: The does Python have variables? debate)

2014-05-12 Thread Mark H Harris
On 5/12/14 3:44 AM, Alain Ketterlin wrote: multiple-dispatch (i.e., dynamically testing types, converting to a common type, and selecting the version of sqrt to use). That's probably more than the time it takes to actually perform the computation, a bit like what happens with x+y on integers

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Mark H Harris
On 5/13/14 12:10 AM, Rustom Mody wrote: I think the most helpful way forward is to accept two things: a. Unicode is a headache b. No-unicode is a non-option QOTW(so far...) -- https://mail.python.org/mailman/listinfo/python-list

Re: Fortran (Was: The does Python have variables? debate)

2014-05-12 Thread Steven D'Aprano
On Tue, 13 May 2014 00:33:47 -0500, Mark H Harris wrote: there has to be a value add for scientists to move away from R or Matlab, or from FORTRAN. Why go to the trouble? FORTRAN works well (its fast too), and there are zillions of lines of code cranking away on huge linear arrays. Enter

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Gene Heskett
On Tuesday 13 May 2014 01:39:06 Mark H Harris did opine And Gene did reply: On 5/13/14 12:10 AM, Rustom Mody wrote: I think the most helpful way forward is to accept two things: a. Unicode is a headache b. No-unicode is a non-option QOTW(so far...) But its early yet, only Tuesday

Re: Simple Function Decorator Sample Snippet

2014-05-12 Thread Steven D'Aprano
On Mon, 12 May 2014 23:41:18 -0500, Mark H Harris wrote: hi folks, I've come up with a simple snippet I don't think that this idea is original to you :-) I'm pretty sure many people have come up with the idea of a decorator that just announces when it runs and when it is called. I know I

Re: Fortran (Was: The does Python have variables? debate)

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 3:48 PM, Steven D'Aprano st...@pearwood.info wrote: Self-modifying code is a nightmare inside the head of a Lovecraftian horror. There's a reason why almost the only people still using self- modifying code are virus writers, and the viruses they create are notorious for

[issue21462] PEP 466: upgrade OpenSSL in the Python 2.7 Windows builds

2014-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: Yes, since OpenSSL 1.0.2 is still in beta, the target version for 2.7.7 would be 1.0.1g -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21462

[issue21474] Idle: updata fixwordbreaks() for unicode identifiers

2014-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is enough to get rid of this function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21474 ___

[issue21469] False positive hazards in robotparser

2014-05-12 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21469 ___ ___ Python-bugs-list

[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-12 Thread Mateusz Łoskot
Mateusz Łoskot added the comment: On 9 May 2014 19:21, Tim Golden rep...@bugs.python.org wrote: Fixed. Thanks for the report Thank you for the fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21452

[issue1599254] mailbox: other programs' messages can vanish without trace

2014-05-12 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1599254 ___ ___ Python-bugs-list mailing list

[issue20115] NUL bytes in commented lines

2014-05-12 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20115 ___ ___ Python-bugs-list mailing list

[issue21475] Support the Sitemap and Crawl-delay extensions in robotparser

2014-05-12 Thread Berker Peksag
Berker Peksag added the comment: There is a patch for Crawl-delay in issue 16099. -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21475 ___

[issue21221] Minor struct_time documentation bug

2014-05-12 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21221 ___ ___ Python-bugs-list mailing list

[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument

2014-05-12 Thread Martin Dengler
Changes by Martin Dengler mar...@martindengler.com: -- nosy: +mdengler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___

[issue17756] test_syntax_error fails when run in the installed location

2014-05-12 Thread Michael Foord
Michael Foord added the comment: It looks like the simplest fix would be to change NameError: to NameError, as the problem is that they're (sometimes!?) on separate lines. This still tests what we want to test. -- ___ Python tracker

[issue17756] test_syntax_error fails when run in the installed location

2014-05-12 Thread Matthias Klose
Matthias Klose added the comment: sure, doing this. my follow-up question was if it is necessary to fix anything else in unittest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17756 ___

[issue21478] mock calls don't propagate to parent (autospec)

2014-05-12 Thread Dmitry Andreychuk
New submission from Dmitry Andreychuk: Calls to autospecced mock functions are not recorded to mock_calls list of parent mock. This only happens if autospec is used and the original object is a function. Example: import unittest.mock as mock def foo(): pass parent = mock.Mock()

[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2014-05-12 Thread Martin Dengler
Changes by Martin Dengler mar...@martindengler.com: -- nosy: +mdengler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9400 ___ ___ Python-bugs-list

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2014-05-12 Thread Martin Dengler
Changes by Martin Dengler mar...@martindengler.com: -- nosy: +mdengler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8296 ___ ___ Python-bugs-list

[issue21198] Minor tarfile documentation bug

2014-05-12 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag, serhiy.storchaka stage: needs patch - patch review Added file: http://bugs.python.org/file35223/issue21198.diff ___ Python tracker rep...@bugs.python.org

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-12 Thread mattip
mattip added the comment: Updated patch for default for empty shape, thanks eryksun -- Added file: http://bugs.python.org/file35224/hg-default-ctypes-fix-pep3118-format-strings-for-arrays-update.patch ___ Python tracker rep...@bugs.python.org

[issue16099] robotparser doesn't support request rate and crawl delay parameters

2014-05-12 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16099 ___

[issue21479] Document TarFile.open() as a classmethod

2014-05-12 Thread Berker Peksag
New submission from Berker Peksag: The patch also updates the signature of TarFile.open(). -- assignee: docs@python components: Documentation files: tarfile-open-classmethod.diff keywords: patch messages: 218323 nosy: berker.peksag, docs@python, serhiy.storchaka priority: normal

[issue20872] dbm/gdbm/ndbm close methods are not document

2014-05-12 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +patch nosy: +berker.peksag stage: needs patch - patch review versions: -Python 3.3 Added file: http://bugs.python.org/file35226/issue20872.diff ___ Python tracker rep...@bugs.python.org

[issue21480] A build now requires...

2014-05-12 Thread Skip Montanaro
New submission from Skip Montanaro: It's been awhile since I pulled from Mercurial and built, but I tried today. I almost immediately ran into an error. The configure step worked fine, but make, not so much: % make python ./Tools/scripts/generate_opcode_h.py ./Lib/opcode.py ./Include/opcode.h

[issue21469] False positive hazards in robotparser

2014-05-12 Thread Tal Einat
Tal Einat added the comment: Changes LGTM. This module could certainly use some cleanup and updates. For example, last_changed should be a property and always accessed one way (instead of either .mtime() or .last_changed) and should be initialized to None instead of zero to avoid ambiguity,

[issue21481] Argpase Namespace object methods __eq__ and __ne__ raise TypeError when comparing to None

2014-05-12 Thread Joe Borg
New submission from Joe Borg: See example: import argparse a = argparse.ArgumentParser() b = a.parse_args([]) if b != None: ... print hey File stdin, line 2 print hey ^ SyntaxError: invalid syntax if b != None: ... print(hey) ... Traceback (most

[issue21482] get_versions() in cygwinccomiler.py cannot return correct gcc version

2014-05-12 Thread Joe Chan
New submission from Joe Chan: cannot return correct gcc version if the path name contains space. Suggest to change to: $ diff -rupN cygwinccompiler.py.original cygwinccompiler.py --- cygwinccompiler.py.original 2014-05-12 23:54:01.296303800 +0800 +++ cygwinccompiler.py 2014-05-12

[issue21480] A build now requires...

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does make touch work for you as well? -- components: +Devguide nosy: +eli.bendersky, ezio.melotti, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21480

[issue20969] Author of EPUB version of Python docs is set to Unknown instead of PSF

2014-05-12 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch. I followed Antoine's name suggestion. PSF would more suitable for the epub_publisher option: http://sphinx-doc.org/config.html#confval-epub_publisher -- keywords: +patch nosy: +berker.peksag stage: needs patch - patch review Added file:

[issue21481] Argpase Namespace object methods __eq__ and __ne__ raise TypeError when comparing to None

2014-05-12 Thread Joe Borg
Joe Borg added the comment: I believe this comes from doing vars(None). But why would this be happening if Namespace is empty. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21481 ___

[issue21480] A build now requires...

2014-05-12 Thread Eli Bendersky
Eli Bendersky added the comment: Skip, PTAL at the devguide. https://docs.python.org/devguide/setup.html#avoiding-re-creating-auto-generated-files -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21480

[issue21482] get_versions() in cygwinccomiler.py cannot return correct gcc version

2014-05-12 Thread Joe Chan
Joe Chan added the comment: better to parenthesis all three exes[gcc, ld and dllwrap] with %s to better support path names that contain non-alphanumeric characters. $ diff -rupN cygwinccompiler.py.original cygwinccompiler.py --- cygwinccompiler.py.original 2014-05-12 23:54:01.296303800 +0800

[issue21480] A build now requires...

2014-05-12 Thread Skip Montanaro
Skip Montanaro added the comment: Does make touch work for you as well? Hadn't tried, and wasn't aware of its existence. I searched Makefile for things like AST_H. Perhaps: * Note make touch where the A build now requires... comment exists. That comment currently discourages users, as it

[issue20826] Faster implementation to collapse consecutive ip-networks

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a much faster patch, around 30x faster than the original code. With exhuma's data set and tester.py, the original code gives: $ time python3.4 tester.py Execution time: 5.949284339199949 seconds real0m30.152s user0m30.104s sys 0m0.016s

[issue12556] Disable size checks in mmap.mmap()

2014-05-12 Thread Josh Triplett
Josh Triplett added the comment: This rejection is indeed problematic. If mmap.mmap receives an explicit size, checking that size against stat will break on devices or special files. It's perfectly reasonable that mmap.mmap's automatic logic when passed length=0 (to map the entire file)

[issue21483] Skip os.utime() test on NFS?

2014-05-12 Thread Skip Montanaro
New submission from Skip Montanaro: I got a strange error during make test in a fresh build (hg clone ; ./configure ; make ; make test) Traceback (most recent call last): File Lib/test/test_import.py, line 293, in test_timestamp_overflow os.utime(source, (2 ** 33 - 5, 2 ** 33 - 5))

[issue20826] Faster implementation to collapse consecutive ip-networks

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Uh, those measurements are wrong, sorry, since tester.py doesn't consume the iterator. When consuming the iterator, the patch is ~ 4x faster than the original code, which is more reasonable :-) -- ___ Python

[issue21484] More clarity needed about difference between x += e and x = x + e

2014-05-12 Thread Feliks
New submission from Feliks: In Sec. 7.2.1 of the Language Reference, in the description of += we have: Also, when possible, the actual operation is performed in-place, meaning that rather than creating a new object and assigning that to the target, the old object is modified instead. Although

[issue16531] Allow IPNetwork to take a tuple

2014-05-12 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: needs patch - patch review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16531 ___

[issue21484] More clarity needed about difference between x += e and x = x + e

2014-05-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: It seems to me like that is one of the most obvious consequences. How is this not an immediately obvious consequence? -- nosy: +josh.rosenberg ___ Python tracker rep...@bugs.python.org

[issue20826] Faster implementation to collapse consecutive ip-networks

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems like the speed of Network.supernet() is a bottleneck here. issue16531 would probably allow making supernet() much faster. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20826

[issue16531] Allow IPNetwork to take a tuple

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch with more tests, documentation updates, and an optimized version of the supernet() that's now 5x faster than the original. I would like to commit this if there's no further comment. -- Added file:

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-12 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13742 ___ ___ Python-bugs-list

[issue17794] Add a key parameter to PriorityQueue

2014-05-12 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17794 ___ ___ Python-bugs-list

[issue21485] remove unnecesary .flush() calls in the asyncio subprocess code example

2014-05-12 Thread akira
New submission from akira: The current code example contains [1]: print(Python failed with exit code %s: % exitcode) sys.stdout.flush() sys.stdout.buffer.flush() sys.stdout.buffer.write(stdout) sys.stdout.buffer.flush() that looks bizarre. Either a comment should be added

  1   2   >