Re: [Python-Dev] Values and objects

2014-05-11 Thread Chris Angelico
[ I think you meant for this to go to python-list, not python-dev. Sending this to python-list. ] On Sun, May 11, 2014 at 3:27 PM, Ethan Furman et...@stoneleaf.us wrote: Seriously though, error messages are chosen to provide a simple and clear description that will help the user track down what

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

2014-05-11 Thread Mark H Harris
On 5/10/14 8:42 AM, Roy Smith wrote: Ars Technica article a couple of days ago, about Fortran, and what is likely to replace it: http://tinyurl.com/mr54p96 uhm, yeeah! 'Julia' is going to give everyone a not so small run for competition; justifiably so, not just against FORTRAN. Julia

Re: Question on Debugging a code line

2014-05-11 Thread subhabangalore
On Sunday, May 11, 2014 12:57:34 AM UTC+5:30, subhaba...@gmail.com wrote: Dear Room, I was trying to go through a code given in http://en.wikipedia.org/wiki/Forward%E2%80%93backward_algorithm[ Forward Backward is an algorithm of Machine Learning-I am not talking on that I am just

Re: Values and objects

2014-05-11 Thread Marko Rauhamaa
Rustom Mody rustompm...@gmail.com: On Saturday, May 10, 2014 2:39:31 PM UTC+5:30, Steven D'Aprano wrote: Personally, I don't imagine that there ever could be a language where variables were first class values *exactly* the same as ints, strings, floats etc. [...] What you mean by

Re: Free vs proprietary (was Re: NumPy, SciPy, Python 3X Installation/compatibility issues)

2014-05-11 Thread Mark H Harris
On 5/10/14 6:35 PM, Chris Angelico wrote: Instead, what we have is a world in which Python can be used to write closed-source software, LibreOffice Writer will happily open a Microsoft Word document, Samba communicates with Windows computers, libc can be linked to non-free binaries, etc, etc,

Re: Values and objects

2014-05-11 Thread Steven D'Aprano
On Sat, 10 May 2014 22:42:13 -0700, Ethan Furman wrote: On 05/10/2014 10:22 PM, Chris Angelico wrote: It's that declaration that creates the variable, not changing locals(). A Python variable is a name bound to a value (and values, of course, are objects). If you don't have both pieces,

Re: Values and objects

2014-05-11 Thread Rustom Mody
On Sunday, May 11, 2014 11:51:59 AM UTC+5:30, Marko Rauhamaa wrote: Rustom Mody : On Saturday, May 10, 2014 2:39:31 PM UTC+5:30, Steven D'Aprano wrote: Personally, I don't imagine that there ever could be a language where variables were first class values *exactly* the same as

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

2014-05-11 Thread Rustom Mody
On Sunday, May 11, 2014 11:47:55 AM UTC+5:30, Mark H. Harris wrote: 'Julia' is going to give everyone a not so small run for competition; justifiably so, not just against FORTRAN. Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on steroids. Its amazing as a dynamic

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

2014-05-11 Thread Steven D'Aprano
On Sun, 11 May 2014 01:17:55 -0500, Mark H Harris wrote: On 5/10/14 8:42 AM, Roy Smith wrote: Ars Technica article a couple of days ago, about Fortran, and what is likely to replace it: http://tinyurl.com/mr54p96 uhm, yeeah! 'Julia' is going to give everyone a not so small run for

Re: Free vs proprietary (was Re: NumPy, SciPy, Python 3X Installation/compatibility issues)

2014-05-11 Thread Steven D'Aprano
On Sat, 10 May 2014 21:16:06 -0700, Nelson Crosby wrote: I also believe in this more 'BSD-like' view, but from a business point of view. No one is going to invest in a business that can't guarantee against piracy, and such a business is much less likely to receive profit (see Ardour). I

Re: Values and objects

2014-05-11 Thread Steven D'Aprano
On Sat, 10 May 2014 18:28:43 -0700, Ethan Furman wrote: On 05/10/2014 04:18 PM, Chris Angelico wrote: On Sun, May 11, 2014 at 5:10 AM, Ethan Furman et...@stoneleaf.us wrote: And if you don't like that argument (although it is a perfectly sound and correct argument), think of the module name

Re: Values and objects

2014-05-11 Thread Steven D'Aprano
On Sun, 11 May 2014 11:59:21 +1000, Chris Angelico wrote: On Sun, May 11, 2014 at 11:28 AM, Ethan Furman et...@stoneleaf.us wrote: Well, with function variables they have to exist *when you use them*. ;) This seems like more of a scoping issue than a can we create variables in Python

Re: Question on Debugging a code line

2014-05-11 Thread subhabangalore
On Sunday, May 11, 2014 11:50:32 AM UTC+5:30, subhaba...@gmail.com wrote: On Sunday, May 11, 2014 12:57:34 AM UTC+5:30, subhaba...@gmail.com wrote: Dear Room, I was trying to go through a code given in http://en.wikipedia.org/wiki/Forward%E2%80%93backward_algorithm[

Re: Values and objects

2014-05-11 Thread Jussi Piitulainen
Marko Rauhamaa writes: Rustom Mody: On Saturday, May 10, 2014 2:39:31 PM UTC+5:30, Steven D'Aprano wrote: Personally, I don't imagine that there ever could be a language where variables were first class values *exactly* the same as ints, strings, floats etc. [...] What you

Re: Values and objects

2014-05-11 Thread Rustom Mody
On Sunday, May 11, 2014 1:56:41 PM UTC+5:30, Jussi Piitulainen wrote: Marko Rauhamaa writes: Rustom Mody: On Saturday, May 10, 2014 2:39:31 PM UTC+5:30, Steven D'Aprano wrote: Personally, I don't imagine that there ever could be a language where variables were first class values

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

2014-05-11 Thread Ross Gayler
Hi, I want to install Python on a PC with 16GB of RAM and the 64 bit version of Windows 7. I want Python to be able to use as much as possible of the RAM. When I install the 64 bit version of Python I find that sys.maxint == 2**31 - 1 Whereas the Pythpon installed on my 64 bit linux system

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

2014-05-11 Thread Terry Reedy
On 5/11/2014 2:56 AM, Ross Gayler wrote: Hi, I want to install Python on a PC with 16GB of RAM and the 64 bit version of Windows 7. I want Python to be able to use as much as possible of the RAM. When I install the 64 bit version of Python I find that sys.maxint == 2**31 - 1 Since

Re: Question on Debugging a code line

2014-05-11 Thread Mark Lawrence
On 11/05/2014 08:45, subhabangal...@gmail.com wrote: [268 lines snipped] Would you please use the mailing list https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing and single line

Re: Values and objects

2014-05-11 Thread Jussi Piitulainen
Rustom Mody writes: On Sunday, May 11, 2014 1:56:41 PM UTC+5:30, Jussi Piitulainen wrote: Marko Rauhamaa writes: Rustom Mody: On Saturday, May 10, 2014 2:39:31 PM UTC+5:30, Steven D'Aprano wrote: Personally, I don't imagine that there ever could be a language where

Re: Values and objects

2014-05-11 Thread Steven D'Aprano
On Sun, 11 May 2014 11:26:41 +0300, Jussi Piitulainen wrote: Marko Rauhamaa writes: Rustom Mody: On Saturday, May 10, 2014 2:39:31 PM UTC+5:30, Steven D'Aprano wrote: Personally, I don't imagine that there ever could be a language where variables were first class values *exactly* the

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

2014-05-11 Thread Benjamin Kaplan
On Sat, May 10, 2014 at 11:56 PM, Ross Gayler r.gay...@gmail.com wrote: Hi, I want to install Python on a PC with 16GB of RAM and the 64 bit version of Windows 7. I want Python to be able to use as much as possible of the RAM. When I install the 64 bit version of Python I find that

Re: Values and objects

2014-05-11 Thread Rotwang
On 11/05/2014 04:11, Steven D'Aprano wrote: [...] And try running this function in both 2.7 and 3.3 and see if you can explain the difference: def test(): if False: x = None exec(x = 1) return x I must confess to being baffled by what happens in 3.3 with this example. Neither

Re: Values and objects

2014-05-11 Thread Rustom Mody
On Sunday, May 11, 2014 6:21:08 PM UTC+5:30, Steven D'Aprano wrote: The point is, it is *logically impossible* for a language to use precisely the same syntax for value-assignment and variable-assignment. Consider the variable called x, which is bound to the value 23. If the language has a

Using threads for audio computing?

2014-05-11 Thread lgabiot
Hello, I'd like to be able to analyze incoming audio from a sound card using Python, and I'm trying to establish a correct architecture for this. Getting the audio is OK (using PyAudio), as well as the calculations needed, so won't be discussing those, but the general idea of being able at

Re: Using threads for audio computing?

2014-05-11 Thread Roy Smith
In article 536f869c$0$2178$426a7...@news.free.fr, lgabiot lgab...@hotmail.com wrote: Hello, I'd like to be able to analyze incoming audio from a sound card using Python, and I'm trying to establish a correct architecture for this. Getting the audio is OK (using PyAudio), as well as the

Re: Values and objects

2014-05-11 Thread Marko Rauhamaa
Rustom Mody rustompm...@gmail.com: On Sunday, May 11, 2014 11:51:59 AM UTC+5:30, Marko Rauhamaa wrote: Lisp variables (symbols) are on an equal footing with other objects. IOW, lisp variables are objects in the heap. But is a symbol a variable?? Yes. A classic lisp symbol is even more

Re: Using threads for audio computing?

2014-05-11 Thread lgabiot
Le 11/05/14 16:40, Roy Smith a écrit : In article 536f869c$0$2178$426a7...@news.free.fr, lgabiot lgab...@hotmail.com wrote: Hello, Le 11/05/14 16:40, Roy Smith a écrit : If you are going to use threads, the architecture you describe seems perfectly reasonable. It's a classic

Re: Values and objects

2014-05-11 Thread Marko Rauhamaa
Jussi Piitulainen jpiit...@ling.helsinki.fi: The claim was that Lisp variables are symbols. What do you write in Common Lisp in place of the ... to have the following evaluate to the the value of the variable x? (let ((x (f)) (y 'x)) (... y ...)) No, (eval y) is not an answer, and

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

2014-05-11 Thread Tomasz Rola
On Sun, May 11, 2014 at 07:09:27AM +, Steven D'Aprano wrote: On Sun, 11 May 2014 01:17:55 -0500, Mark H Harris wrote: On 5/10/14 8:42 AM, Roy Smith wrote: Ars Technica article a couple of days ago, about Fortran, and what is likely to replace it: http://tinyurl.com/mr54p96

Re: Fortran

2014-05-11 Thread Marko Rauhamaa
Tomasz Rola rto...@ceti.pl: Given that Fortran is here for almost 60 years and lot of effort has been spent to keep it backwards compatible (AFAIK), I wouldn't hold my breath. I have seen a glimpse of the so-called scientific computing and Fortran programming. I can't help but think that

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

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 2:09 AM, Tomasz Rola rto...@ceti.pl wrote: Given that Fortran is here for almost 60 years and lot of effort has been spent to keep it backwards compatible (AFAIK), I wouldn't hold my breath. Something may look like cool and great, but wait ten years and see if after

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

2014-05-11 Thread Alain Ketterlin
Mark H Harris harrismh...@gmail.com writes: On 5/10/14 8:42 AM, Roy Smith wrote: http://tinyurl.com/mr54p96 'Julia' is going to give everyone a not so small run for competition; justifiably so, not just against FORTRAN. Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on

Re: Fortran

2014-05-11 Thread Roy Smith
In article 871tw0s2kl@elektro.pacujo.net, Marko Rauhamaa ma...@pacujo.net wrote: Tomasz Rola rto...@ceti.pl: Given that Fortran is here for almost 60 years and lot of effort has been spent to keep it backwards compatible (AFAIK), I wouldn't hold my breath. I have seen a glimpse

Re: Fortran

2014-05-11 Thread Tomasz Rola
On Mon, May 12, 2014 at 02:42:13AM +1000, Chris Angelico wrote: On Mon, May 12, 2014 at 2:09 AM, Tomasz Rola rto...@ceti.pl wrote: Given that Fortran is here for almost 60 years and lot of effort has been spent to keep it backwards compatible (AFAIK), I wouldn't hold my breath. Something

Re: Fortran

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 4:04 AM, Tomasz Rola rto...@ceti.pl wrote: And the pipe extention is one of the things I'd consider - as well as other similar means, like SOAP or REST. Yep. My point was, keep the processes separate and it's easy. There are myriad ways of doing the glue. ChrisA --

Re: Fortran

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 3:51 AM, Roy Smith r...@panix.com wrote: It is fine. Computers are tools. The sign of a good tool is that you can pick it up and use it without having to read the instruction manual. I can jump into pretty much any car, start the engine, and drive it, without any

Re: Fortran

2014-05-11 Thread Ethan Furman
On 05/11/2014 10:51 AM, Roy Smith wrote: In article 871tw0s2kl@elektro.pacujo.net, Marko Rauhamaa ma...@pacujo.net wrote: Tomasz Rola rto...@ceti.pl: Given that Fortran is here for almost 60 years and lot of effort has been spent to keep it backwards compatible (AFAIK), I wouldn't hold

Re: Fortran

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 4:05 AM, Ethan Furman et...@stoneleaf.us wrote: For the most part cars are very similar, yet in some circumstances (such as a vehicle in front of you suddenly stopping) the exact details (such as the precise location and size and shape of the brake pedal) become

Re: Values and objects

2014-05-11 Thread Ned Batchelder
On 5/11/14 9:46 AM, Rotwang wrote: On 11/05/2014 04:11, Steven D'Aprano wrote: [...] And try running this function in both 2.7 and 3.3 and see if you can explain the difference: def test(): if False: x = None exec(x = 1) return x I must confess to being baffled by what

Re: Fortran

2014-05-11 Thread Roy Smith
In article mailman.9891.1399833209.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: Some things are more standardized than others. A piano keyboard is incredibly standard, to make it possible to play without having to look at your fingers (even when jumping your hands

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

2014-05-11 Thread Mark H Harris
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 core. Its astounding, really. Hmmm... Its

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

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 4:54 AM, Mark H Harris harrismh...@gmail.com wrote: The following code will produce over 100,000 digits of π (pi) in less than 2 seconds on a low-end processor, like my mac mini dual core 2Ghz: julia prec=524288 524288 julia with_bigfloat_precision(prec) do

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

2014-05-11 Thread Simon Evans
Thank you everyone who replied, for your help. Using the command prompt console, it accepts the first line of code, but doesn't seem to accept the second line. I have altered it a little, but it is not having any of it, I quote my console input and output here, as it can probably explain

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

2014-05-11 Thread Mark H Harris
On 5/11/14 1:59 PM, Chris Angelico wrote: julia prec=524288 524288 julia with_bigfloat_precision(prec) do println(atan(BigFloat(1)/5)*16 - atan(BigFloat(1)/239)*4) end Would it be quicker (and no less accurate) to represent pi as atan(BigFloat(1))*4 instead? That's how I

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

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 5:05 AM, Simon Evans musicalhack...@yahoo.co.uk wrote: Thank you everyone who replied, for your help. Using the command prompt console, it accepts the first line of code, but doesn't seem to accept the second line. I have altered it a little, but it is not having any

Re: Values and objects

2014-05-11 Thread Marko Rauhamaa
Marko Rauhamaa ma...@pacujo.net: I don't see any practical reason for that limitation. If you allow setq/setf/set!, you have no reason to disallow symbol-value on a local variable. In fact, the reason probably is practical and analogous to the locals() caveat in Python. If the language made

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

2014-05-11 Thread Simon Evans
Dear Chris Angelico, Yes, you are right, I did install Python 3.4 as well as 2.7. I have removed Python 3.4, and input the code you suggested and it looks like it has installed properly, returning the following code:-

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

2014-05-11 Thread MRAB
On 2014-05-11 21:03, Simon Evans wrote: Dear Chris Angelico, Yes, you are right, I did install Python 3.4 as well as 2.7. I have removed Python 3.4, and input the code you suggested and it looks like it has installed properly, returning the following code:-

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

2014-05-11 Thread Terry Reedy
On 5/11/2014 3:17 PM, Chris Angelico wrote: On Mon, May 12, 2014 at 5:05 AM, Simon Evans musicalhack...@yahoo.co.uk wrote: c:\Beautiful Souppython setup.py install. There is no need for a standalone Beautiful Soup directory. See below. File setup.py, line 22 print Unit tests have

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

2014-05-11 Thread Simon Evans
I have downloaded Beautiful Soup 3, I am using Python 2.7. I understand from your message that I ought to use Python 2.6 or Python 3.4 with Beautiful Soup 4, the book I am using 'Getting Started with Beautiful Soup' is for Beautiful Soup 4. Therefore I gather I must re-download Beautiful Soup

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

2014-05-11 Thread MRAB
On 2014-05-11 23:03, Simon Evans wrote: I have downloaded Beautiful Soup 3, I am using Python 2.7. I understand from your message that I ought to use Python 2.6 or Python 3.4 with Beautiful Soup 4, the book I am using 'Getting Started with Beautiful Soup' is for Beautiful Soup 4. Therefore I

Re: Values and objects

2014-05-11 Thread Rotwang
On 11/05/2014 19:40, Ned Batchelder wrote: On 5/11/14 9:46 AM, Rotwang wrote: On 11/05/2014 04:11, Steven D'Aprano wrote: [...] And try running this function in both 2.7 and 3.3 and see if you can explain the difference: def test(): if False: x = None exec(x = 1) return x I

Re: Fortran

2014-05-11 Thread Steven D'Aprano
On Sun, 11 May 2014 14:43:19 -0400, Roy Smith wrote: In article mailman.9891.1399833209.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: Some things are more standardized than others. A piano keyboard is incredibly standard, to make it possible to play without having to

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

2014-05-11 Thread Simon Evans
Yeah well at no point does the book say to start inputting the code mentioned in Python command prompt rather than the Windows command prompt, but thank you for your guidance anyway. I have downloaded the latest version of Beautiful Soup 4, but am again facing problems with the second line of

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

2014-05-11 Thread Simon Evans
On Monday, May 12, 2014 12:19:24 AM UTC+1, Simon Evans wrote: Yeah well at no point does the book say to start inputting the code mentioned in Python command prompt rather than the Windows command prompt, but thank you for your guidance anyway. I have downloaded the latest version of

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

2014-05-11 Thread Simon Evans
- but wait a moment 'BeautifulSoup4 works with 2.6+ and 3.x'(Terry Reedy) - doesn't 2.6 + = 2.7, which is what I'm using with BeautifulSoup4. -- 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-11 Thread Ian Kelly
On Sun, May 11, 2014 at 5:19 PM, Simon Evans musicalhack...@yahoo.co.uk wrote: Yeah well at no point does the book say to start inputting the code mentioned in Python command prompt rather than the Windows command prompt, but thank you for your guidance anyway. I have downloaded the latest

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

2014-05-11 Thread Terry Reedy
On 5/11/2014 6:03 PM, Simon Evans wrote: I have downloaded Beautiful Soup 3, I am using Python 2.7. I understand from your message that I ought to use Python 2.6or Python 3.4 with Beautiful Soup 4, I wrote BeautifulSoup4 works with 2.6+ and 3.x.. '2.6+' means 2.6 or 2.7. '3.x' should mean 3.1

Re: Fortran

2014-05-11 Thread MRAB
On 2014-05-12 00:15, Steven D'Aprano wrote: On Sun, 11 May 2014 14:43:19 -0400, Roy Smith wrote: In article mailman.9891.1399833209.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: Some things are more standardized than others. A piano keyboard is incredibly standard, to

Re: Fortran

2014-05-11 Thread Steven D'Aprano
On Mon, 12 May 2014 04:08:15 +1000, Chris Angelico wrote: On Mon, May 12, 2014 at 3:51 AM, Roy Smith r...@panix.com wrote: It is fine. Computers are tools. The sign of a good tool is that you can pick it up and use it without having to read the instruction manual. I can jump into pretty

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

2014-05-11 Thread Ian Kelly
On Sun, May 11, 2014 at 5:47 PM, Ian Kelly ian.g.ke...@gmail.com wrote: Also, use Python 3.4 as Terry Reedy suggested, unless the book is using 2.7 in which case you should probably use the same version as the book. Following up on that, if this is the book you are using:

Re: Fortran

2014-05-11 Thread Roy Smith
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 mailman.9891.1399833209.18130.python-l...@python.org, Chris Angelico

Re: Fortran

2014-05-11 Thread Mark Lawrence
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 practices. In my neck of the woods some years ago people were killed when standing at a bus stop, because the

Re: Fortran

2014-05-11 Thread Steven D'Aprano
On Mon, 12 May 2014 00:51:01 +0100, MRAB wrote: On 2014-05-12 00:15, Steven D'Aprano wrote: On Sun, 11 May 2014 14:43:19 -0400, Roy Smith wrote: Speaking of which, here's a trivia question. Without looking at your keyboard, describe how the F and J keys (assuming a US-English key layout)

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

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 6:31 AM, Terry Reedy tjre...@udel.edu wrote: Please do not advise people to unnecessarily downgrade to 2.7 ;-). Simon just needs the proper current version of BeautifulSoup. BeautifulSoup3 does not work with 3.x. BeautifulSoup4 works with 2.6+ and 3.x.

Re: Fortran

2014-05-11 Thread Steven D'Aprano
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 practices. In my neck of the woods some years ago

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

2014-05-11 Thread Rustom Mody
On Saturday, May 10, 2014 10:28:18 PM UTC+5:30, Simon Evans wrote: I am new to Python, but my main interest is to use it to Webscrape. I guess you've moved on from this specific problem. However here is some general advice: To use beautiful soup you need to use python. To use python you need to

Re: Fortran

2014-05-11 Thread Dave Angel
On 05/11/2014 09:11 PM, Steven D'Aprano wrote: On Mon, 12 May 2014 00:51:01 +0100, MRAB wrote: Certainly not. However they may be different where *you* are :-P I'm using an IBM keyboard, model SK-8820. Mine have an little ridge on the keytop of those keys. I've seen keyboards with

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

2014-05-11 Thread Dave Angel
On 05/11/2014 02:54 PM, Mark H Harris wrote: julia sin(BigFloat(π/4)) 7.0710678118654750275194295621751674626154323953749278952436611913748 20215180412e-01 with 256 bits of precision That answer doesn't seem to come anywhere near 256 bits of precision. Using Python 3.2,

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

2014-05-11 Thread Mark H Harris
On 5/11/14 10:10 PM, Dave Angel wrote: On 05/11/2014 02:54 PM, Mark H Harris wrote: julia sin(BigFloat(π/4)) 7.0710678118654750275194295621751674626154323953749278952436611913748 20215180412e-01 with 256 bits of precision That answer doesn't seem to come anywhere near 256 bits of

Re: parsing multiple root element XML into text

2014-05-11 Thread Percy Tambunan
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 give you a new root.

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

2014-05-11 Thread Mark H Harris
On 5/11/14 11:10 PM, Mark H Harris wrote: On 5/11/14 10:10 PM, Dave Angel wrote: On 05/11/2014 02:54 PM, Mark H Harris wrote: julia sin(BigFloat(π/4)) 7.0710678118654750275194295621751674626154323953749278952436611913748 20215180412e-01 with 256 bits of precision That answer doesn't

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

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 2:26 PM, Mark H Harris harrismh...@gmail.com wrote: Having said that, the accuracy was not my point; in the first place. My point is that the sin() function is built-in... So what? Built-in just means that there's no namespacing of mathematical functions. ChrisA --

Re: Using threads for audio computing?

2014-05-11 Thread lgabiot
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 next 2048 samples from

Re: Using threads for audio computing?

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 3:33 PM, lgabiot lgab...@hotmail.com wrote: But AFAIK the python GIL (and in smaller or older computers that have only one core) does not permit true paralell execution of two threads. I believe it is quite like the way multiple processes are handled by an OS on a single

Re: Using threads for audio computing?

2014-05-11 Thread lgabiot
Le 12/05/14 07:41, Chris Angelico a écrit : The GIL is almost completely insignificant here. One of your threads will be blocked practically the whole time (waiting for more samples; collecting them into a numpy array doesn't take long), and the other is, if I understand correctly, spending

[issue21470] Better seeding for the random module

2014-05-11 Thread Charles-François Natali
Charles-François Natali added the comment: The default seeding for the random module currently used 32 bytes from urandom() to create the initial state of the random number generator. This is far less than the number of possible states 2**19937-1. I'm not a cryptography expert, but IMO 32

[issue21424] Simplify and speed-up heaqp.nlargest()

2014-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset fadc06047314 by Raymond Hettinger in branch 'default': Issue #21424: Optimize heaqp.nlargest() to make fewer tuple comparisons. http://hg.python.org/cpython/rev/fadc06047314 -- nosy: +python-dev ___

[issue21467] IDLE icon not included in Windows installer

2014-05-11 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: test needed - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21467 ___ ___

[issue21424] Simplify and speed-up heaqp.nlargest()

2014-05-11 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file35213/rip_nsmallest.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21424

[issue21470] Better seeding for the random module

2014-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Several thoughts: * We're not reading urandom a huge number of times per second. This is just one read of 2,500 bytes. What Ted is talking about and what we're doing are as different as night and day. * We're also not doing this in a loop. It is just

[issue21470] Better seeding for the random module

2014-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: http://www.2uo.de/myths-about-urandom/ Thanks, interesting read. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21470 ___

[issue21470] Better seeding for the random module

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21470 ___

[issue21471] subprocess line-buffering only works in universal newlines mode

2014-05-11 Thread Antoine Pitrou
New submission from Antoine Pitrou: The docs for subprocess.Popen seem to imply that line-buffering is always available. However, bufsize=1 is a special value only when open the pipes in text mode, i.e. when universal newlines are enabled. In the short term, we should probably fix the

[issue21472] Fix wsgiref handling of absolute HTTP Request-URI

2014-05-11 Thread mouad
New submission from mouad: Hi, As most of you know, working behind a HTTP proxy raise all this corner cases that no one think about until he has to, one of them i had to deal with some months ago is absolute request URI in HTTP request, that some client will send when they detect that they

[issue21471] subprocess line-buffering only works in universal newlines mode

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21471 ___

[issue21472] Fix wsgiref handling of absolute HTTP Request-URI

2014-05-11 Thread mouad
Changes by mouad mouad...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file35214/issue21472.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21472 ___

[issue21471] subprocess line-buffering doesn't work

2014-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ha, it seems actually worse than that, since no buffering argument is ever passed to the TextIOWrapper constructor. bufsize=1 will simply get ignored, and line buffering doesn't work at all. Example under 2.7: $ python -c 'import subprocess; p =

[issue21425] Interactive interpreter doesn't flush stderr prompty

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21425 ___

[issue21471] subprocess line-buffering only works in universal newlines mode

2014-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, the not working at all part is issue #21332. Let's make this issue specific to binary mode, again. -- nosy: +akira title: subprocess line-buffering doesn't work - subprocess line-buffering only works in universal newlines mode

[issue20115] NUL bytes in commented lines

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20115 ___

[issue21425] Interactive interpreter doesn't flush stderr prompty

2014-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab3e012c45d0 by Antoine Pitrou in branch '3.4': Issue #21425: Fix flushing of standard streams in the interactive interpreter. http://hg.python.org/cpython/rev/ab3e012c45d0 New changeset d1c0cf44160c by Antoine Pitrou in branch 'default': Issue

[issue21425] Interactive interpreter doesn't flush stderr prompty

2014-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the report. This should now be fixed in 3.4 and 3.5. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21425

[issue21389] The repr of BoundMethod objects sometimes incorrectly identifies the bound function

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21389 ___

[issue18564] Integer overflow in socketmodule

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18564 ___

[issue21226] PyImport_ExecCodeModuleObject not setting module attributes

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21226 ___

[issue21422] int 0: return the number unmodified

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21422 ___

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21121 ___

[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21420 ___

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20383 ___

  1   2   >