Re: GUI toolkit(s) status

2014-11-20 Thread Paul Rubin
[email protected] 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 wrote: > [email protected] 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 one reason or an

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 wrote: [email protected] 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. He is trolling, b

Re: GUI toolkit(s) status

2014-11-20 Thread Chris Angelico
On Thu, Nov 20, 2014 at 8:04 PM, Christian Gollwitzer 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 the wis

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" % (hea

Re: tkinter mainloop

2014-11-20 Thread ast
"Rick Johnson" a écrit dans le message de news:[email protected]... 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 the following code you wil

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

Re: Trouble getting full response content from PATCH request

2014-11-20 Thread Cameron Simpson
On 19Nov2014 17:17, John Gordon wrote: In Cameron Simpson 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 >document containing a diagnostic message in the tag. > >When I submit my test data

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 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 be unicode b

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 thi

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

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 <[email protected]> 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-a

Re: pack circles into a partial annulus

2014-11-20 Thread Roy Smith
In article , Robin Becker 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 to do this. > > Has anyone any ideas about how to do this? This is

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 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 feedback, I

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 "", line 1, in > 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 > 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 = """Test html a tag example ... http://www.

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

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 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: 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
[email protected] 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 2:40 AM, Peter Otten <[email protected]> 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: 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: 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 <[email protected]> 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: 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 <[email protected]> wrote: > Chris Angelico wrote: > >> On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <[email protected]> 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 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 <[email protected]> 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 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 docs disappointing

2014-11-20 Thread Michael Torrie
On 11/20/2014 08:54 AM, [email protected] 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: 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: 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: 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 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

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: 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 <[email protected]> wrote: >> Chris Angelico wrote: >> >>> On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <[email protected]> wrote: I think that you may get a Unicode/Encode/Error when you try to /decode/ a unicode string

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: 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: 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: 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: 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 Peter Otten
[email protected] 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: 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 : > 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

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

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

Re: Python IDE.

2014-11-20 Thread dvenkatj2eedev
On Thursday, November 20, 2014 2:09:24 PM UTC-5, [email protected] 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: Python IDE.

2014-11-20 Thread Irmen de Jong
On 20-11-2014 20:19, [email protected] wrote: > On Thursday, November 20, 2014 2:09:24 PM UTC-5, [email protected] 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 Michael Torrie
On 11/20/2014 12:01 PM, [email protected] 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, [email protected] > 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: 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: 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: 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: 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 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: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: 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 < [email protected]> 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 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: 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: 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: 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: 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: 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: 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 <[email protected]> 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: Most gratuitous comments

2014-11-20 Thread cl
[email protected] 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: Most gratuitous comments

2014-11-20 Thread sohcahtoa82
On Thursday, November 20, 2014 1:33:16 PM UTC-8, [email protected] wrote: > [email protected] 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: [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: 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: 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: 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: 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: 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: 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, [email protected] 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 IDE.

2014-11-20 Thread Grant Edwards
On 2014-11-20, [email protected] 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 IDE.

2014-11-20 Thread Steven D'Aprano
[email protected] 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
[email protected] wrote: > On Thursday, November 20, 2014 1:33:16 PM UTC-8, [email protected] wrote: >> [email protected] 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 docs disappointing

2014-11-20 Thread Mark Lawrence
On 20/11/2014 23:10, Grant Edwards wrote: On 2014-11-20, [email protected] 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 Mark Lawrence
On 20/11/2014 21:32, [email protected] wrote: [email protected] 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 Steven D'Aprano
[email protected] 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, 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 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: 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: Most gratuitous comments

2014-11-20 Thread sohcahtoa82
On Thursday, November 20, 2014 3:16:33 PM UTC-8, Steven D'Aprano wrote: > [email protected] wrote: > > > On Thursday, November 20, 2014 1:33:16 PM UTC-8, [email protected] wrote: > >> [email protected] wrote: > >> > > >> > # increment x > >> > x += 1 > >> > >> But it shouldn't say 'increment x', it

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

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 10:13 AM, Steven D'Aprano wrote: > [email protected] 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: 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: 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 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: 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: 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 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 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: 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: 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   >