Re: [Tutor] Limitation of int() in converting strings

2012-12-22 Thread Oscar Benjamin
On 22 December 2012 01:34, Steven D'Aprano st...@pearwood.info wrote: On 18/12/12 01:36, Oscar Benjamin wrote: I think it's unfortunate that Python's int() function combines two distinct behaviours in this way. In different situations int() is used to: 1) Coerce an object of some type other

[Tutor] regex: matching unicode

2012-12-22 Thread Albert-Jan Roskam
Hi, Is the code below the only/shortest way to match unicode characters? I would like to match whatever is defined as a character in the unicode reference database. So letters in the broadest sense of the word, but not digits, underscore or whitespace. Until just now, I was convinced that the

[Tutor] check it for me

2012-12-22 Thread Farrukh Ali
Hi Tutor, I am new to python, and a novice in the world of programming, I am learning python from learnpythonthehardway, and now a little bit confused in exercise 3, where the author of the book wants us to rewrite the ex3.py by saying Rewrite ex3.py to use floating point numbers so it’s more

Re: [Tutor] check it for me

2012-12-22 Thread Dave Angel
On 12/22/2012 04:02 PM, Farrukh Ali wrote: Hi Tutor, I am new to python, and a novice in the world of programming, I am learning python from learnpythonthehardway, and now a little bit confused in exercise 3, where the author of the book wants us to rewrite the ex3.py by saying Rewrite

Re: [Tutor] check it for me

2012-12-22 Thread Farrukh Ali
Hi, i am using ActivePython 2.7.2.5, and windows 8 professional. well the original ex3.py is: print I will now count my chickens: print Hens, 25 + 30 / 6 print Roosters, 100 - 25 * 3 % 4 print Now I will count the eggs: print 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6 print Is it true that 3 + 2 5 - 7?

Re: [Tutor] check it for me

2012-12-22 Thread Dave Angel
On 12/22/2012 05:38 PM, Farrukh Ali wrote: Hi, i am using ActivePython 2.7.2.5, and windows 8 professional. well the original ex3.py is: print I will now count my chickens: print Hens, 25 + 30 / 6 print Roosters, 100 - 25 * 3 % 4 print Now I will count the eggs: print 3 + 2 + 1 - 5 + 4 % 2

Re: [Tutor] regex: matching unicode

2012-12-22 Thread Hugo Arts
On Sat, Dec 22, 2012 at 9:53 PM, Albert-Jan Roskam fo...@yahoo.com wrote: Hi, Is the code below the only/shortest way to match unicode characters? I would like to match whatever is defined as a character in the unicode reference database. So letters in the broadest sense of the word, but not

[Tutor] playing mp3 files

2012-12-22 Thread Kirk Bailey
The best I have found still has some cereal in it- lots of flakes and nuts. Anyone got some ideas on playing mp3 files in a windows machine? -- -Shaboom. Kirk Bailey CEO, Freehold Marketing LLC http://www.OneBuckHosting.com/ Fnord! ___

[Tutor] Patch bugs in windows

2012-12-22 Thread Harsh Bhatia
The document of python representing bug patching in windows is lot confusing ... can anyone help me with an example of previous solved bug ... from its issue to patch submission. thank you !! ___ Tutor maillist -

Re: [Tutor] regex: matching unicode

2012-12-22 Thread Steven D'Aprano
On 23/12/12 07:53, Albert-Jan Roskam wrote: Hi, Is the code below the only/shortest way to match unicode characters? No. You could install a more Unicode-aware regex engine, and use it instead of Python's re module, where Unicode support is at best only partial. Try this one:

Re: [Tutor] playing mp3 files

2012-12-22 Thread Steven D'Aprano
On 21/12/12 10:46, Kirk Bailey wrote: the robotradio program is coming along. It plays. it dances. it sings. IT selects random libraries and random broadcast files. and it restarts itself with consummate ease. Is that a good thing or a bad thing? Aka, NOW wtf?!? Jim is exchanging letters

Re: [Tutor] Patch bugs in windows

2012-12-22 Thread Steven D'Aprano
On 23/12/12 15:11, Harsh Bhatia wrote: The document of python representing bug patching in windows is lot confusing ... can anyone help me with an example of previous solved bug ... from its issue to patch submission. thank you !! What document are you

Re: [Tutor] playing mp3 files

2012-12-22 Thread Steven D'Aprano
On 23/12/12 14:33, Kirk Bailey wrote: The best I have found still has some cereal in it- lots of flakes and nuts. Anyone got some ideas on playing mp3 files in a windows machine? Since this is at least your third post on this subject, and I don't think anyone has replied yet, I guess the

[Tutor] List Comprehension Syntax

2012-12-22 Thread Mario Cacciatore
Hey everyone, I am having a very hard time understanding the list comprehension syntax. I've followed the docs and could use some guidance from the fine folks here to supplement my findings. If someone wouldn't mind replying back with an example or two, with some explanation of each part I'd