Re: GUI toolkit(s) status

2014-11-20 Thread Paul Rubin
wxjmfa...@gmail.com writes: Today, there are simply no more valid and working GUI toolkit running out of the box. Tkinter still works for me. What's the problem? -- https://mail.python.org/mailman/listinfo/python-list

Re: GUI toolkit(s) status

2014-11-20 Thread Chris Angelico
On Thu, Nov 20, 2014 at 7:25 PM, Paul Rubin no.email@nospam.invalid wrote: wxjmfa...@gmail.com writes: Today, there are simply no more valid and working GUI toolkit running out of the box. Tkinter still works for me. What's the problem? Ignore jmf. Most of us didn't even see his post, for

Re: GUI toolkit(s) status

2014-11-20 Thread Christian Gollwitzer
Am 20.11.14 09:40, schrieb Chris Angelico: On Thu, Nov 20, 2014 at 7:25 PM, Paul Rubin no.email@nospam.invalid wrote: wxjmfa...@gmail.com writes: Today, there are simply no more valid and working GUI toolkit running out of the box. Tkinter still works for me. What's the problem? Ignore

Re: GUI toolkit(s) status

2014-11-20 Thread Chris Angelico
On Thu, Nov 20, 2014 at 8:04 PM, Christian Gollwitzer aurio...@gmx.de wrote: Am 20.11.14 09:40, schrieb Chris Angelico: Ignore jmf. He is trolling, but in this point he is right, unfortunately: neither Tcl nor Tk support Unicode outside the BMP. Full Unicode support is a big todo item on

python 2.7 and unicode (one more time)

2014-11-20 Thread Francis Moreau
Hello, My application is using gettext module to do the translation stuff. Translated messages are unicode on both python 2 and 3 (with python2.7 I had to explicitely asked for unicode). A problem arises when formatting those messages before logging them. For example: log.debug(%s: %s %

Re: tkinter mainloop

2014-11-20 Thread ast
Rick Johnson rantingrickjohn...@gmail.com a écrit dans le message de news:3385be62-e21c-4efe-802e-8f7351155...@googlegroups.com... You don't need to call mainloop() when building Tkinter widgets on the command-line, but for *real* scripts i believe you'll need to. For instance, if you run

pack circles into a partial annulus

2014-11-20 Thread Robin Becker
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. The region is described in polar coords as {(r,theta) | r0=r=r1 theta0=theta=theta1}. The circles to be packed have three different radii, but all will fit singly into the

Re: Trouble getting full response content from PATCH request

2014-11-20 Thread Cameron Simpson
On 19Nov2014 17:17, John Gordon gor...@panix.com wrote: In mailman.15988.1416366536.18130.python-l...@python.org Cameron Simpson c...@zip.com.au writes: The API uses the HTTP PATCH operation to set user passwords, and in case of unacceptable passwords, the response is supposed to be an HTML

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Thu, Nov 20, 2014 at 8:40 PM, Francis Moreau francis.m...@gmail.com wrote: My question is: how should this be fixed properly ? A simple solution would be to force all strings passed to the logger to be unicode: log.debug(u%s: %s % ...) and more generally force all string in my code to

Re: Most gratuitous comments

2014-11-20 Thread Mark Lawrence
On 20/11/2014 04:58, 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 I wonder if anybody has ever written

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Peter Otten
Francis Moreau wrote: Hello, My application is using gettext module to do the translation stuff. Translated messages are unicode on both python 2 and 3 (with python2.7 I had to explicitely asked for unicode). A problem arises when formatting those messages before logging them. For

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Thu, Nov 20, 2014 at 11:35 PM, Peter Otten __pete...@web.de wrote: You don't need to change an all-ascii bytestring to unicode. Lo and behold: %s %s % (uüblich, uähnlich) u'\xfcblich \xe4hnlich' u%s %s % (uüblich, uähnlich) u'\xfcblich \xe4hnlich' Only non-ascii bytestrings mean

Re: pack circles into a partial annulus

2014-11-20 Thread Roy Smith
In article mailman.16011.1416478357.18130.python-l...@python.org, Robin Becker ro...@reportlab.com wrote: I need to pack circles into a partial annulus ie part of a larger circle bounded by two radii [...] Circle packing is hard so I'm thinking of using some kind of spring/repulsion model

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

2014-11-20 Thread holger krekel
On Sat, Nov 15, 2014 at 10:45 +, Paul Moore wrote: On 7 November 2014 15:46, Paul Moore p.f.mo...@gmail.com wrote: To that end, I'd like to get an idea of what sort of access to Windows a typical Unix developer would have. Thanks to all who contributed to this thread. Based on the

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread random832
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 stdin, line 1, in module UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128) This is surprising to me - why is it

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Francis Moreau
Hi, On 11/20/2014 11:47 AM, Chris Angelico wrote: On Thu, Nov 20, 2014 at 8:40 PM, Francis Moreau francis.m...@gmail.com wrote: My question is: how should this be fixed properly ? A simple solution would be to force all strings passed to the logger to be unicode: log.debug(u%s: %s %

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 = htmlbodypTest html a tag example/p ... 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, 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 stdin, line 1, in module UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4:

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 = htmlbodypTest html a

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 francis.m...@gmail.com 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.

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, and

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 stdin, line 1, in module UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128) This is

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, and

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

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, are

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 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 get

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... Hang on a minute,

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 even mean to

Re: Python docs disappointing

2014-11-20 Thread Joel Goldstick
On Thu, Nov 20, 2014 at 10:54 AM, jstnms...@gmail.com 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

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 think,

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, sohcahto...@gmail.com 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.

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

Re: Python docs disappointing

2014-11-20 Thread Skip Montanaro
On Thu, Nov 20, 2014 at 9:54 AM, jstnms...@gmail.com 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

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

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

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 is more

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, 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 stdin, line 1, in module

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

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 **

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Ian Kelly
On Thu, Nov 20, 2014 at 10:42 AM, random...@fastmail.us 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

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 ian.g.ke...@gmail.com wrote: On Thu, Nov 20, 2014 at 10:42 AM, random...@fastmail.us 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

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, 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 stdin, line

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 Marko Rauhamaa
Michael Torrie torr...@gmail.com: 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

Python IDE.

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

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: doc = new

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: Python IDE.

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

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 # Used for

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, dvenkatj2ee...@gmail.com 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

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, dvenkatj2ee...@gmail.com wrote: Can someone suggest a good python IDE. PyCharm, but it's not free. If you can tell me a free

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 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, dvenkatj2ee...@gmail.com wrote: Can someone suggest a good python IDE. PyCharm, but it's not free. If you can tell me

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 torr...@gmail.com wrote: On

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 juan0christ...@gmail.com 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

Re: Working with HTML5 documents

2014-11-20 Thread Ian Kelly
On Thu, Nov 20, 2014 at 12:02 PM, Stefan Behnel stefan...@behnel.de 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

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

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 also hard

Re:Help with an 8th grade science project

2014-11-20 Thread Dave Angel
dave em daveandem2...@gmail.com 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: -

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

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 da...@davea.name wrote: dave em daveandem2...@gmail.com 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

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, random...@fastmail.us 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: 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

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 da...@davea.name 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

Re: Working with HTML5 documents

2014-11-20 Thread Ian Kelly
On Thu, Nov 20, 2014 at 1:10 PM, Stefan Behnel stefan...@behnel.de 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:

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 breamore...@yahoo.co.uk 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

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 Unicode

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 · --

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 well.

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 hol...@merlinux.eu 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.

Re: Python IDE.

2014-11-20 Thread TP
On Thu, Nov 20, 2014 at 11:29 AM, Irmen de Jong irmen.nos...@xs4all.nl 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

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Marko Rauhamaa
Ethan Furman et...@stoneleaf.us: 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

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 breamore...@yahoo.co.uk 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

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 alister.nospam.w...@ntlworld.com 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

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, there

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: Python docs disappointing

2014-11-20 Thread Grant Edwards
On 2014-11-20, jstnms...@gmail.com 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

Re: Python IDE.

2014-11-20 Thread Grant Edwards
On 2014-11-20, dvenkatj2ee...@gmail.com 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

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: 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 name to

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 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

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

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: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 4:42 AM, random...@fastmail.us 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?

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 ma...@pacujo.net wrote: Michael Torrie torr...@gmail.com: 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

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 juan0christ...@gmail.com wrote: On Thu Nov 20 2014 at 8:20:29 PM alister alister.nospam.w...@ntlworld.com 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

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 should say 'add one to

Re: Most gratuitous comments

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 10:59 AM, sohcahto...@gmail.com 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

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

Re: Python IDE.

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 10:13 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info 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

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, sohcahto...@gmail.com 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,

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 wuwe...@gmail.com 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

Re: Most gratuitous comments

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 11:19 AM, sohcahto...@gmail.com 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.

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Steven D'Aprano
Marko Rauhamaa wrote: Michael Torrie torr...@gmail.com: 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

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 steve+comp.lang.pyt...@pearwood.info 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

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 the

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 12:31 PM, random...@fastmail.us 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

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 quite

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

  1   2   >