Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 6:14 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Fri, Nov 21, 2014 at 5:36 PM, Marko Rauhamaa wrote: >>> I'm saying equating an abstract data type (string) with its >>> representation (Unicode vector) is bad taste. >> >> What about "sequence of Unicode code points

Re: Beginner

2014-11-20 Thread Karthik Reddy
Now Its working Thanks a lot Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Marko Rauhamaa
Chris Angelico : > On Fri, Nov 21, 2014 at 5:36 PM, Marko Rauhamaa wrote: >> I'm saying equating an abstract data type (string) with its >> representation (Unicode vector) is bad taste. > > What about "sequence of Unicode code points" is "representation"? What > is your abstraction over that? Th

Re: Infinitely nested containers

2014-11-20 Thread Marko Rauhamaa
Gill Shen : > How is this [nesting] behavior implemented under the hood? Pointers. > And why is this allowed at all? There's no reason not to. > Is it just a curiosity or can you do something useful with it? It absolutely does arise every here and there. It's so natural you don't even pay att

Re: Infinitely nested containers

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 4:54 PM, Gill Shen wrote: > How is this behavior implemented under the hood? And why is this allowed at > all? Is it just a curiosity or can you do something useful with it? Simple: The list contains itself. When you dereference the list, you get back the original list. I

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 5:36 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Fri, Nov 21, 2014 at 5:56 AM, Marko Rauhamaa wrote: >>> I don't really like it how Unicode is equated with text, or even >>> character strings. >> [...] >> Do you have actual text that you're unable to represent in

Re: Most gratuitous comments

2014-11-20 Thread Marko Rauhamaa
sohcahto...@gmail.com: > My point was that I was making fun of CS professors that demand a > comment on every line of code, regardless of how clear the line of > code is. Unfortunately, a lot of software houses do a similar thing. Not quite every line, but stuff like: def write_line_to_file(f

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Marko Rauhamaa
Chris Angelico : > On Fri, Nov 21, 2014 at 5:56 AM, Marko Rauhamaa wrote: >> I don't really like it how Unicode is equated with text, or even >> character strings. > [...] > Do you have actual text that you're unable to represent in Unicode? Not my point at all. I'm saying equating an abstract

Infinitely nested containers

2014-11-20 Thread Gill Shen
Purely out of curiosity I tried this (on 2.7.3): >>> ls = [] >>> ls.append(ls) >>> ls [[...]] The list appears to be ... infinitely nested: >>> ls == >>> ls[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]

Re: Is StopIteration a singleton?

2014-11-20 Thread Terry Reedy
On 11/20/2014 11:23 PM, Chris Angelico wrote: On Fri, Nov 21, 2014 at 2:40 PM, Terry Reedy wrote: On 11/20/2014 12:09 AM, Steven D'Aprano wrote: No idea. But you can marshal StopIteration itself, but not StopIteration instances: py> marshal.dumps(StopIteration) 'S' py> marshal.dumps(StopIter

Re: GUI toolkit(s) status

2014-11-20 Thread Paul Rubin
Terry Reedy writes: > Tcl/Tk currently use UCS-2, which only handles BMP chars. Alternatives > to support astral chars: [other encodings] I haven't looked into the issue but from Christian's post it sounded like the BMP limitation was deeper inside Tcl/TK and would take more serious work to fix.

Re: GUI toolkit(s) status

2014-11-20 Thread Terry Reedy
On 11/20/2014 4:04 AM, Christian Gollwitzer wrote: Tcl nor Tk support Unicode outside the BMP. Full Unicode support is a big todo item on the wishlist for Tcl 9, for Tk nobody really knows. We are lacking manpower and people with specialized knowledge. Tcl/Tk currently use UCS-2, which only ha

Re: Is StopIteration a singleton?

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 2:40 PM, Terry Reedy wrote: > On 11/20/2014 12:09 AM, Steven D'Aprano wrote: > >> No idea. But you can marshal StopIteration itself, but not StopIteration >> instances: >> >> py> marshal.dumps(StopIteration) >> 'S' >> py> marshal.dumps(StopIteration()) >> Traceback (most re

Re: PyWart: "Python's import statement and the history of external dependencies"

2014-11-20 Thread Rick Johnson
On Thursday, November 20, 2014 6:15:03 PM UTC-6, alex23 wrote: > On 16/11/2014 3:01 PM, Rick Johnson wrote: > [...] > > Actually, Python is not alone in this deficiency, no, Python > > is just *ANOTHER* language in a *STRING* of languages over > > the years who has *YET AGAIN* implemented the same

Re: Is StopIteration a singleton?

2014-11-20 Thread Terry Reedy
On 11/20/2014 12:09 AM, Steven D'Aprano wrote: No idea. But you can marshal StopIteration itself, but not StopIteration instances: py> marshal.dumps(StopIteration) 'S' py> marshal.dumps(StopIteration()) Traceback (most recent call last): File "", line 1, in ValueError: unmarshallable object

Re: Python IDE.

2014-11-20 Thread Tim Chase
On 2014-11-20 21:54, Dennis Lee Bieber wrote: > VIM in one window for editing, and a bare command line for test > execution in another (I'm sure VIM probably has a way to invoke a > command line, It can be done, but (without an unofficial patch) it's modal, so most of us vi/vim users prefer to hos

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/20/2014 08:06 PM, Michael Torrie wrote: > anyway I've attached the working example. Just a little caveat. This code is not my original code. I would not do certain things that I just noticed, like these lines: from PyQt4.QtCore import * I would never do that normally, and recommend that

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/20/2014 01:25 PM, Juan Christian wrote: > **Back to the list > > So, as I said the PyQt doc is using C o.0 > > Yes, I read the tutorials, I'll google for some books and things related. Okay so I took a long look at the example code that was on stackoverflow and figured it out. It's not qu

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 12:31 PM, wrote: > On Thu, Nov 20, 2014, at 20:10, Chris Angelico wrote: >> 2) Languages which use a different alphabet (eg Cyrillic - Russian, >> Bulgarian). You could possibly cram them into an eight-bit encoding >> without tipping ASCII out, but I'm not sure. In Unicode

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread random832
On Thu, Nov 20, 2014, at 20:10, Chris Angelico wrote: > 2) Languages which use a different alphabet (eg Cyrillic - Russian, > Bulgarian). You could possibly cram them into an eight-bit encoding > without tipping ASCII out, but I'm not sure. In Unicode, these > languages are all easily supported by

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 11:32 AM, Steven D'Aprano wrote: > (E.g. there are millions of existing files across the world containing text > which use legacy encodings that are not compatible with Unicode.) Not compatible with Unicode? There aren't many character sets out there that include character

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Steven D'Aprano
Marko Rauhamaa wrote: > Michael Torrie : > >> Unicode can only be encoded to bytes. >> Bytes can only be decoded to unicode. > > I don't really like it how Unicode is equated with text, or even > character strings. That surely depends on the context. To be technically correct, Unicode is a char

Re: Most gratuitous comments

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 11:19 AM, wrote: > On Thursday, November 20, 2014 4:17:33 PM UTC-8, Chris Angelico wrote: >> It's about giving people proper credit for what they said. > > Fair enough. Thank you. That's a nice, tidy attribution line, and it's clear who said what. Including both name and

Re: PyWart: "Python's import statement and the history of external dependencies"

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 11:14 AM, alex23 wrote: >> 1. Name clashes! >> 2. Smaller name pool! > > Just off the top of my head, we have several solutions for this: > > 1) Rebinding imports > > import foo as foo2 To be fair to Rick, this doesn't actually solve anything. If you have two

Re: Most gratuitous comments

2014-11-20 Thread sohcahtoa82
On Thursday, November 20, 2014 4:17:33 PM UTC-8, Chris Angelico wrote: > On Fri, Nov 21, 2014 at 10:59 AM, wrote: > >> (By the way, whatever tool you are using to post comments is badly breaking > >> attributions. It is polite to give the person's full name when quoting > >> them, when they provi

Re: Python IDE.

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 10:13 AM, Steven D'Aprano wrote: > dvenkatj2ee...@gmail.com wrote: > >> Can someone suggest a good python IDE. > > Yes. Use a UNIX or Linux system: > > http://blog.sanctum.geek.nz/series/unix-as-ide/ My IDE is Xfce, with a bunch of plugins called SciTE, Google Chrome, xfce

Re: PyWart: "Python's import statement and the history of external dependencies"

2014-11-20 Thread alex23
On 16/11/2014 3:01 PM, Rick Johnson wrote: Python's attempt to solve the "external dependencies problem" has yet to produce the results that many people, including myself, would like. I'd say this was an argumentum ad populum, only you didn't cite anything that shows the "many" you claim you s

Re: Most gratuitous comments

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 10:59 AM, wrote: >> (By the way, whatever tool you are using to post comments is badly breaking >> attributions. It is polite to give the person's full name when quoting >> them, when they provide one, if not give their full email address. >> Truncating their email address

Re: Most gratuitous comments

2014-11-20 Thread sohcahtoa82
On Thursday, November 20, 2014 3:16:33 PM UTC-8, Steven D'Aprano wrote: > sohcahto...@gmail.com wrote: > > > On Thursday, November 20, 2014 1:33:16 PM UTC-8, c...@isbd.net wrote: > >> s...@gmail.com wrote: > >> > > >> > # increment x > >> > x += 1 > >> > >> But it shouldn't say 'increment x', it

Re: How to access Qt components loaded from file?

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 9:41 AM, Juan Christian wrote: > On Thu Nov 20 2014 at 8:20:29 PM alister > wrote: >> >> Then either do the necessary work (you have just proven you can)or find a >> better way of communicating with this news group(NNTP or the mailing >> list), otherwise you may find a num

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 5:56 AM, Marko Rauhamaa wrote: > Michael Torrie : > >> Unicode can only be encoded to bytes. >> Bytes can only be decoded to unicode. > > I don't really like it how Unicode is equated with text, or even > character strings. > > There's barely any difference between the trut

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 4:42 AM, wrote: > On Thu, Nov 20, 2014, at 09:59, Chris Angelico wrote: >> >> Why should it encode to bytes? > > Because a bytes format string suggests a bytes result. Why does unicode > always "win", rather than the type of the format string always winning? For the same

Re: Python docs disappointing

2014-11-20 Thread Steven D'Aprano
jstnms...@gmail.com wrote: > I write this to address the criticism which targets a user's lack of > responsibility for the real/implied/insinuated failings of the docs. As a > relatively inexperienced student of programming, I am not in any position > to contribute/edit the documents. THAT DOES

Re: Most gratuitous comments

2014-11-20 Thread Mark Lawrence
On 20/11/2014 21:32, c...@isbd.net wrote: sohcahto...@gmail.com wrote: # increment x x += 1 But it shouldn't say 'increment x', it should say 'add one to the line count' or some such. Although changing the variable name to 'lineCount' would do almost as well. Would you please clarify whet

Re: Python docs disappointing

2014-11-20 Thread Mark Lawrence
On 20/11/2014 23:10, Grant Edwards wrote: On 2014-11-20, jstnms...@gmail.com wrote: I write this to address the criticism which targets a user's lack of responsibility for the real/implied/insinuated failings of the docs. As a relatively inexperienced student of programming, I am not in any po

Re: Most gratuitous comments

2014-11-20 Thread Steven D'Aprano
sohcahto...@gmail.com wrote: > On Thursday, November 20, 2014 1:33:16 PM UTC-8, c...@isbd.net wrote: >> s...@gmail.com wrote: >> > >> > # increment x >> > x += 1 >> >> But it shouldn't say 'increment x', it should say 'add one to the line >> count' or some such. Although changing the variable n

Re: Python IDE.

2014-11-20 Thread Steven D'Aprano
dvenkatj2ee...@gmail.com wrote: > Can someone suggest a good python IDE. Yes. Use a UNIX or Linux system: http://blog.sanctum.geek.nz/series/unix-as-ide/ -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Python IDE.

2014-11-20 Thread Grant Edwards
On 2014-11-20, dvenkatj2ee...@gmail.com wrote: > Can someone suggest a good python IDE. Sure: emacs, bash, grep, et alia. -- Grant Edwards grant.b.edwardsYow! Hello? Enema Bondage? at I'm calling because I want

Re: Python docs disappointing

2014-11-20 Thread Grant Edwards
On 2014-11-20, jstnms...@gmail.com wrote: > I write this to address the criticism which targets a user's lack of > responsibility for the real/implied/insinuated failings of the docs. > As a relatively inexperienced student of programming, I am not in any > position to contribute/edit the docume

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread random832
On Thu, Nov 20, 2014, at 16:29, Ethan Furman wrote: > If your unicode string happens to contain a base64 encoded .png, then you > could decode that into bytes. ;) Bytes of the PNG, or of the raw pixels? -- https://mail.python.org/mailman/listinfo/python-list

Re: Tag objects in Beautiful Soup

2014-11-20 Thread Denis McMahon
On Thu, 20 Nov 2014 06:31:08 -0800, Simon Evans wrote: > Can anyone tell me where I am going wrong or where the text is wrong ? > So far the given code has run okay, I have put to the console everything > the text tells you to. Thank you for reading. > Simon Evans Having looked at the ebook, ther

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
On Thu Nov 20 2014 at 8:20:29 PM alister wrote: > > Then either do the necessary work (you have just proven you can)or find a > better way of communicating with this news group(NNTP or the mailing > list), otherwise you may find a number of good people simply ignore your > posts. > > While you are

Re: How to access Qt components loaded from file?

2014-11-20 Thread alister
On Thu, 20 Nov 2014 21:19:28 +, Juan Christian wrote: > On Thu Nov 20 2014 at 7:07:10 PM Mark Lawrence > wrote: >> >> You also need to study the difference between top posting, interspersed >> posting and bottom posting. The second and third are very much the >> prefered styles here. >> >> >

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Marko Rauhamaa
Ethan Furman : > If your unicode string happens to contain a base64 encoded .png, then > you could decode that into bytes. ;) You could embed your PNG file in XML in binary form as CDATA. Then, your "characters" would represent 8- or 16-bit integers. You just need to replace all accidental occurr

Re: Python IDE.

2014-11-20 Thread TP
On Thu, Nov 20, 2014 at 11:29 AM, Irmen de Jong wrote: > PyCharm *is* free, if you fall in one of several categories. > See http://www.jetbrains.com/pycharm/buy/license-matrix.jsp > > Even when you have to buy it, it is cheap (IMO) for what it offers. > "PyCharm Editions Comparison" [1] is a bet

Re: [Distutils] Call for information - What assumptions can I make about Unix users' access to Windows?

2014-11-20 Thread Paul Moore
On 20 November 2014 13:31, holger krekel wrote: > Thanks Paul for going through this! Looking forward to the link/code. Cheers - it's not forgotten, but real life's being a nuisance, so it's on the back burner for a short while. I'll try to get something done in a few weeks. Paul -- https://mai

Re: Most gratuitous comments

2014-11-20 Thread sohcahtoa82
On Thursday, November 20, 2014 1:33:16 PM UTC-8, c...@isbd.net wrote: > s...@gmail.com wrote: > > > > # increment x > > x += 1 > > But it shouldn't say 'increment x', it should say 'add one to the line > count' or some such. Although changing the variable name to > 'lineCount' would do almost as

Re: Most gratuitous comments

2014-11-20 Thread cl
sohcahto...@gmail.com wrote: > > # increment x > x += 1 But it shouldn't say 'increment x', it should say 'add one to the line count' or some such. Although changing the variable name to 'lineCount' would do almost as well. -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-l

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Ethan Furman
On 11/20/2014 07:53 AM, Chris Angelico wrote: > On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <__pete...@web.de> wrote: >> I think that you may get a Unicode/Encode/Error when you try to /decode/ a >> unicode string is more confusing... > > Hang on a minute, what does it even mean to decode a Unico

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
On Thu Nov 20 2014 at 7:07:10 PM Mark Lawrence wrote: > > You also need to study the difference between top posting, interspersed > posting and bottom posting. The second and third are very much the > prefered styles here. > Yes I know, but I'm using the new Google Inbox, and I limited to what I

Re: Working with HTML5 documents

2014-11-20 Thread Ian Kelly
On Thu, Nov 20, 2014 at 1:10 PM, Stefan Behnel wrote: > Ian Kelly schrieb am 20.11.2014 um 20:44: >> On Thu, Nov 20, 2014 at 12:02 PM, Stefan Behnel wrote: >>> There's also the E-factory for creating (sub-)trees and a nicely objectish >>> way: >>> >>> http://lxml.de/lxmlhtml.html#creating-html-wi

Re: Help with an 8th grade science project

2014-11-20 Thread dave
On Thursday, November 20, 2014 1:48:06 PM UTC-7, Ian wrote: > On Thu, Nov 20, 2014 at 1:13 PM, Dave Angel wrote: > > > >> 1. In the factorial() function we call the CPU_Percent() function and > >> write the CPU utilization value to a file. > >> - Is this a correct value or will the CPU utiliza

Re: How to access Qt components loaded from file?

2014-11-20 Thread Mark Lawrence
On 20/11/2014 17:57, Juan Christian wrote: So, I need to study QThreads, do you know any book or video-course that talks about this matter? I've seen the tutorials that you pointed but I need a "wider" approach regarding QThreads to really understand it and apply it to my needs. The docs aren't t

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Mark Lawrence
On 20/11/2014 18:06, Ian Kelly wrote: On Thu, Nov 20, 2014 at 10:42 AM, wrote: and it means you can't safely blindly use %s with an unknown object. You can't safely do this anyway. Whether it's %s with a str and a unicode, or %s with a unicode and a str, *something* is going to have to be im

Re: Help with an 8th grade science project

2014-11-20 Thread Ian Kelly
On Thu, Nov 20, 2014 at 1:13 PM, Dave Angel wrote: > dave em Wrote in message: >> 1. In the factorial() function we call the CPU_Percent() function and write >> the CPU utilization value to a file. >> - Is this a correct value or will the CPU utilization below lower because >> the factorial()

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
**Back to the list So, as I said the PyQt doc is using C o.0 Yes, I read the tutorials, I'll google for some books and things related. On Tue Nov 18 2014 at 10:48:44 AM Vincent Vande Vyvre < vincent.vande.vy...@telenet.be> wrote: > Le 18/11/2014 13:18, Juan Christian a écrit : > > I have this s

Re:Help with an 8th grade science project

2014-11-20 Thread Dave Angel
dave em Wrote in message: > Hello, > > I am the adult advisor (aka father) to an 8th grader who is doing a science > project that will compare / benchmark CPU performance between an AMD 64 > Phenom II running Ubuntu 14.04 and a Raspberry Pi 700MHz ARM. > > Basic procedure: > - Run a Python sc

Re: Working with HTML5 documents

2014-11-20 Thread Stefan Behnel
Ian Kelly schrieb am 20.11.2014 um 20:44: > On Thu, Nov 20, 2014 at 12:02 PM, Stefan Behnel wrote: >> There's also the E-factory for creating (sub-)trees and a nicely objectish >> way: >> >> http://lxml.de/lxmlhtml.html#creating-html-with-the-e-factory > > That looks ugly with all those caps and

RE: Python IDE.

2014-11-20 Thread Clayton Kirkwood
Community edition is free but with limited capability, although you will be hard pressed to find a limiting factor especially for general programming. All of the bells and whistles can be found in the sold product. Also, the student/teacher edition is available, and in fact a new version came out t

Re: Working with HTML5 documents

2014-11-20 Thread Ian Kelly
On Thu, Nov 20, 2014 at 12:02 PM, Stefan Behnel wrote: > There's also the E-factory for creating (sub-)trees and a nicely objectish > way: > > http://lxml.de/lxmlhtml.html#creating-html-with-the-e-factory That looks ugly with all those caps and also hard to extend. Notably it seems to be missing

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
Another problem is that this doc doesn't use Python. On Thu Nov 20 2014 at 5:36:37 PM Juan Christian wrote: > Yes, I read everything and saw that stackoverlfow on Google too. I'm > reading this doc: http://pyqt.sourceforge.net/Docs/PyQt4/classes.html > > I just asked for a book because normally

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
Yes, I read everything and saw that stackoverlfow on Google too. I'm reading this doc: http://pyqt.sourceforge.net/Docs/PyQt4/classes.html I just asked for a book because normally there are books for anything =p On Thu Nov 20 2014 at 5:08:09 PM Michael Torrie wrote: > On 11/20/2014 10:57 AM, Ju

Re: Python IDE.

2014-11-20 Thread alister
On Thu, 20 Nov 2014 11:19:23 -0800, dvenkatj2eedev wrote: > On Thursday, November 20, 2014 2:09:24 PM UTC-5, larry@gmail.com > wrote: >> On Thu, Nov 20, 2014 at 2:01 PM, wrote: >> > Can someone suggest a good python IDE. >> >> PyCharm, but it's not free. > > If you can tell me a free one,

Re: Python IDE.

2014-11-20 Thread Michael Torrie
On 11/20/2014 12:01 PM, dvenkatj2ee...@gmail.com wrote: > Can someone suggest a good python IDE. I'm sure Google can reveal many options and opinions on the matter. Personally I don't find IDEs that useful with Python. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python IDE.

2014-11-20 Thread Irmen de Jong
On 20-11-2014 20:19, dvenkatj2ee...@gmail.com wrote: > On Thursday, November 20, 2014 2:09:24 PM UTC-5, larry@gmail.com wrote: >> On Thu, Nov 20, 2014 at 2:01 PM, wrote: >>> Can someone suggest a good python IDE. >> >> PyCharm, but it's not free. > > If you can tell me a free one, that will

Re: Python IDE.

2014-11-20 Thread dvenkatj2eedev
On Thursday, November 20, 2014 2:09:24 PM UTC-5, larry@gmail.com wrote: > On Thu, Nov 20, 2014 at 2:01 PM, wrote: > > Can someone suggest a good python IDE. > > PyCharm, but it's not free. If you can tell me a free one, that will be great. I was looking at the following document, which st

Re: Most gratuitous comments

2014-11-20 Thread Stefan Behnel
Chris Angelico schrieb am 20.11.2014 um 06:06: > On Thu, Nov 20, 2014 at 3:58 PM, Steven D'Aprano wrote: >> And the award for the most gratuitous comments before an import goes to >> one of my (former) workmates, who wrote this piece of code: >> >> # Used for base64-decoding. >> import base64 >> #

Re: Python IDE.

2014-11-20 Thread Larry Martell
On Thu, Nov 20, 2014 at 2:01 PM, wrote: > Can someone suggest a good python IDE. PyCharm, but it's not free. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/20/2014 10:57 AM, Juan Christian wrote: > So, I need to study QThreads, do you know any book or video-course that > talks about this matter? I've seen the tutorials that you pointed but I > need a "wider" approach regarding QThreads to really understand it and > apply it to my needs. The docs

Re: Working with HTML5 documents

2014-11-20 Thread Stefan Behnel
Tim schrieb am 20.11.2014 um 18:31: > On Thursday, November 20, 2014 12:04:09 PM UTC-5, Denis McMahon wrote: >>> On Wednesday, November 19, 2014 2:08:27 PM UTC-7, Denis McMahon wrote: So what I'm looking for is a method to create an html5 document using "dom manipulation", ie: d

Python IDE.

2014-11-20 Thread dvenkatj2eedev
Can someone suggest a good python IDE. -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Marko Rauhamaa
Michael Torrie : > Unicode can only be encoded to bytes. > Bytes can only be decoded to unicode. I don't really like it how Unicode is equated with text, or even character strings. There's barely any difference between the truth value of these statements: Python strings are ASCII. Python

Re: Most gratuitous comments

2014-11-20 Thread sohcahtoa82
On Wednesday, November 19, 2014 8:59:01 PM UTC-8, Steven D'Aprano wrote: > And the award for the most gratuitous comments before an import goes to > one of my (former) workmates, who wrote this piece of code: > > # Used for base64-decoding. > import base64 > # Used for ungzipping. > import gzip >

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Peter Otten
random...@fastmail.us wrote: > On Thu, Nov 20, 2014, at 09:59, Chris Angelico wrote: >> On Fri, Nov 21, 2014 at 12:59 AM, wrote: >> > On Thu, Nov 20, 2014, at 07:35, Peter Otten wrote: >> >> >>> "%s nötig %s" % (u"üblich", u"ähnlich") >> >> Traceback (most recent call last): >> >> File "", lin

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Ian Kelly
On Thu, Nov 20, 2014 at 11:06 AM, Ian Kelly wrote: > On Thu, Nov 20, 2014 at 10:42 AM, wrote: >> and it means you can't safely >> blindly use %s with an unknown object. > > You can't safely do this anyway. Whether it's %s with a str and a > unicode, or %s with a unicode and a str, *something* is

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Ian Kelly
On Thu, Nov 20, 2014 at 10:42 AM, wrote: > and it means you can't safely > blindly use %s with an unknown object. You can't safely do this anyway. Whether it's %s with a str and a unicode, or %s with a unicode and a str, *something* is going to have to be implicitly encoded or decoded, and if as

Re: Challenge: optimizing isqrt

2014-11-20 Thread Serhiy Storchaka
On 01.11.14 03:29, Steven D'Aprano wrote: There is an algorithm for calculating the integer square root of any positive integer using only integer operations: Here is my optimized implementation inspired by Christian's ideas. import math, sys C1 = sys.float_info.radix ** sys.float_info.mant_d

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
So, I need to study QThreads, do you know any book or video-course that talks about this matter? I've seen the tutorials that you pointed but I need a "wider" approach regarding QThreads to really understand it and apply it to my needs. The docs aren't that clear for me. On Thu Nov 20 2014 at 1:43

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread random832
On Thu, Nov 20, 2014, at 09:59, Chris Angelico wrote: > On Fri, Nov 21, 2014 at 12:59 AM, wrote: > > On Thu, Nov 20, 2014, at 07:35, Peter Otten wrote: > >> >>> "%s nötig %s" % (u"üblich", u"ähnlich") > >> Traceback (most recent call last): > >> File "", line 1, in > >> UnicodeDecodeError: 'as

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Peter Otten
Chris Angelico wrote: > On Fri, Nov 21, 2014 at 3:32 AM, Peter Otten <__pete...@web.de> wrote: >> Chris Angelico wrote: >> >>> On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <__pete...@web.de> wrote: I think that you may get a Unicode/Encode/Error when you try to /decode/ a unicode string

Help with an 8th grade science project

2014-11-20 Thread dave em
Hello, I am the adult advisor (aka father) to an 8th grader who is doing a science project that will compare / benchmark CPU performance between an AMD 64 Phenom II running Ubuntu 14.04 and a Raspberry Pi 700MHz ARM. Basic procedure: - Run a Python script on both computers that that stresses t

Re: Working with HTML5 documents

2014-11-20 Thread Tim
On Thursday, November 20, 2014 12:04:09 PM UTC-5, Denis McMahon wrote: > On Wed, 19 Nov 2014 13:43:17 -0800, Novocastrian_Nomad wrote: > > > On Wednesday, November 19, 2014 2:08:27 PM UTC-7, Denis McMahon wrote: > >> So what I'm looking for is a method to create an html5 document using > >> "dom m

Re: Python docs disappointing

2014-11-20 Thread Skip Montanaro
On Thu, Nov 20, 2014 at 9:54 AM, wrote: > > Here is an *entirely typical* example: on some Unix, try > > > > % pydoc urllib > I don't know who "kj" is, and jstnms123 seems to be basically off his rocker, so I won't try cc'ing either of them. (They also seem to misunderstand the nature of contrib

Re: Working with HTML5 documents

2014-11-20 Thread Denis McMahon
On Wed, 19 Nov 2014 13:43:17 -0800, Novocastrian_Nomad wrote: > On Wednesday, November 19, 2014 2:08:27 PM UTC-7, Denis McMahon wrote: >> So what I'm looking for is a method to create an html5 document using >> "dom manipulation", ie: >> >> doc = new htmldocument(doctype="HTML") >> html = new htm

Re: How modules work in Python

2014-11-20 Thread Michael Torrie
On 11/19/2014 02:50 PM, Chris Angelico wrote: > On Thu, Nov 20, 2014 at 6:00 AM, wrote: >> I only started reading this list about a month ago, and from what I've seen, >> being pedantic is pretty much par for the course. > > Usually in a good way. :) And often for good reason. -- https://mail

Re: Python docs disappointing

2014-11-20 Thread Michael Torrie
On 11/20/2014 08:54 AM, jstnms...@gmail.com wrote: > Perhaps the reason programs are so inelegant, and so user-UNfriendly, > and so bug-infested, is a natural consequence, when a field is > dominated by creatures who know much more than they comprehend, and > much less than they need to? If, I thi

Re: Python docs disappointing

2014-11-20 Thread Joel Goldstick
On Thu, Nov 20, 2014 at 10:54 AM, wrote: > On Friday, July 31, 2009 2:10:45 PM UTC-6, kj wrote: >> I'm pretty new to Python, and I like a lot overall, but I find the >> documentation for Python rather poor, overall. >> >> I'm sure that Python experts don't have this problem: they have >> internal

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Michael Torrie
On 11/20/2014 09:32 AM, Peter Otten wrote: > Chris Angelico wrote: > >> On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <__pete...@web.de> wrote: >>> I think that you may get a Unicode/Encode/Error when you try to /decode/ >>> a unicode string is more confusing... >> >> Hang on a minute, what does it

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 3:32 AM, Peter Otten <__pete...@web.de> wrote: > Chris Angelico wrote: > >> On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <__pete...@web.de> wrote: >>> I think that you may get a Unicode/Encode/Error when you try to /decode/ >>> a unicode string is more confusing... >> >> Han

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Peter Otten
Chris Angelico wrote: > On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <__pete...@web.de> wrote: >> I think that you may get a Unicode/Encode/Error when you try to /decode/ >> a unicode string is more confusing... > > Hang on a minute, what does it even mean to decode a Unicode string? Let's not g

Re: pack circles into a partial annulus

2014-11-20 Thread Cousin Stanley
> I need to pack circles into a partial annulus ie part of a larger circle > bounded by two radii and angles of say 18 & 90. You might take a look at Descartes Circle Theorem http://en.wikipedia.org/wiki/Descartes'_theorem Blub from google search In geometry, Descartes

Re: Python docs disappointing

2014-11-20 Thread jstnms123
On Friday, July 31, 2009 2:10:45 PM UTC-6, kj wrote: > I'm pretty new to Python, and I like a lot overall, but I find the > documentation for Python rather poor, overall. > > I'm sure that Python experts don't have this problem: they have > internalized some good ways to access the documentation,

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <__pete...@web.de> wrote: > I think that you may get a Unicode/Encode/Error when you try to /decode/ a > unicode string is more confusing... Hang on a minute, what does it even mean to decode a Unicode string? That's where the problem is. Fortunately th

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/19/2014 07:53 PM, Juan Christian wrote: > Thanks, it's working using QTimer. The thing is that whenever the program > is going to do something, in my case, draw a new QGroupBox with some > components inside and put it in the Form (I'm using VBoxLayout in the main > form) the program freezes,

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Peter Otten
random...@fastmail.us wrote: > On Thu, Nov 20, 2014, at 07:35, Peter Otten wrote: >> >>> "%s nötig %s" % (u"üblich", u"ähnlich") >> Traceback (most recent call last): >> File "", line 1, in >> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: >> ordinal not in range(128) >

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/19/2014 07:53 PM, Juan Christian wrote: > Thanks, it's working using QTimer. The thing is that whenever the program > is going to do something, in my case, draw a new QGroupBox with some > components inside and put it in the Form (I'm using VBoxLayout in the main > form) the program freezes,

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 1:14 AM, Francis Moreau wrote: > Hi, > > Thanks for the "from __future__ import unicode_literals" trick, it makes > that switch much less intrusive. > > However it seems that I will suddenly be trapped by all modules which > are not prepared to handle unicode. For example:

Re: Tag objects in Beautiful Soup

2014-11-20 Thread Peter Otten
Simon Evans wrote: > Re:'Accessing the Tag object from Beautiful Soup' (page 22-25 - Getting > Started with Beautiful Soup) So far the code to python27 runs as given in > the book, re: - > html_atag = """Test html a

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 12:59 AM, wrote: > On Thu, Nov 20, 2014, at 07:35, Peter Otten wrote: >> >>> "%s nötig %s" % (u"üblich", u"ähnlich") >> Traceback (most recent call last): >> File "", line 1, in >> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: >> ordinal not in

Tag objects in Beautiful Soup

2014-11-20 Thread Simon Evans
Re:'Accessing the Tag object from Beautiful Soup' (page 22-25 - Getting Started with Beautiful Soup) So far the code to python27 runs as given in the book, re: - >>> html_atag = """Test html a tag example ... http://www.

  1   2   >