Re: Classes

2014-11-02 Thread Dan Sommers
On Mon, 03 Nov 2014 03:12:32 +, Denis McMahon wrote: > Quadrilateral > Parallelogram > Square > Rectangle > Rhombus > Diamond (4 sides eq) > Trapezoid > Arrowhead What's the difference between a Diamond and a Rhombus? > Is an arrowhead a trapez

Re: Classes

2014-11-02 Thread Denis McMahon
On Sun, 02 Nov 2014 11:31:12 -0500, Dennis Lee Bieber wrote: > On Sun, 2 Nov 2014 12:27:06 + (UTC), Denis McMahon > declaimed the following: > >>On Sun, 02 Nov 2014 21:32:13 +1100, Tim Delaney wrote: >>> If course, that's probably because rectangles have a multitude of uses >>> for user int

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Chris Angelico
On Mon, Nov 3, 2014 at 8:59 AM, Simon Evans wrote: > Oh I don't mind quoting console output, I just thought I'd be sparing you > unnecessary detail. One of the tricks experienced programmers learn is how to skim a pile of output for what's important. When that output is a Python traceback, I woul

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Mark Lawrence
On 02/11/2014 22:20, Simon Evans wrote: What I meant to say was I can't get the html5 or the html parsers to install, I have got their downloads in their respective directories in the downloads directory. For the third time of asking will you please provide some context. For the fourth tim

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Mark Lawrence
On 02/11/2014 21:59, Simon Evans wrote: Oh I don't mind quoting console output, I just thought I'd be sparing you unnecessary detail. output was going nicely as I input text from my 'Getting Started with Beautiful Soup' even when the author reckoned things would go wrong - due to lxml not be

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Simon Evans
What I meant to say was I can't get the html5 or the html parsers to install, I have got their downloads in their respective directories in the downloads directory. -- https://mail.python.org/mailman/listinfo/python-list

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Chris Angelico
On Mon, Nov 3, 2014 at 9:07 AM, Dave Angel wrote: > Brute force would take a few millenia, as something like > ans = sum(range( BIG ) - sum(range(1000)) > > But just knowing the math lets you simplify it to something like >ans = (1000 + BIG) * (BIG - 1000) / 2 Suggestion: Master the brute

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Dave Angel
On 11/02/2014 04:03 PM, Seymore4Head wrote: On Sun, 02 Nov 2014 19:42:49 +, Mark Lawrence wrote: On 02/11/2014 19:10, Seymore4Head wrote: On Sun, 2 Nov 2014 12:16:11 -0500, Joel Goldstick wrote: On Sun, Nov 2, 2014 at 10:08 AM, Peter Otten <__pete...@web.de> wrote: Huhuai Fan wrote:

Re: Classes

2014-11-02 Thread Larry Hudson
On 11/02/2014 01:50 AM, Denis McMahon wrote: [snip] from math import sqrt class SquareGeometryError(Exception): """The parameters create an illegal geometry for a square""" pass class Rectangle: def __init__(self,length,width): self.length=length self.width=wid

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Joel Goldstick
On Sun, Nov 2, 2014 at 4:03 PM, Seymore4Head wrote: > On Sun, 02 Nov 2014 19:42:49 +, Mark Lawrence > wrote: > >>On 02/11/2014 19:10, Seymore4Head wrote: >>> On Sun, 2 Nov 2014 12:16:11 -0500, Joel Goldstick >>> wrote: >>> On Sun, Nov 2, 2014 at 10:08 AM, Peter Otten <__pete...@web.de>

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Simon Evans
Oh I don't mind quoting console output, I just thought I'd be sparing you unnecessary detail. output was going nicely as I input text from my 'Getting Started with Beautiful Soup' even when the author reckoned things would go wrong - due to lxml not being installed, things went right, becau

Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py?

2014-11-02 Thread Ned Deily
In article , Cyd Haselton wrote: > Just checking: is sincos() the same as sin() and cos()? Nm output for > my toolchain's libm does show sin() and cos() just not sincos() See, this is what you get when you ask for free help: bad info. sincos isn't the same, as a little of googling informs me.

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Seymore4Head
On Sun, 02 Nov 2014 19:42:49 +, Mark Lawrence wrote: >On 02/11/2014 19:10, Seymore4Head wrote: >> On Sun, 2 Nov 2014 12:16:11 -0500, Joel Goldstick >> wrote: >> >>> On Sun, Nov 2, 2014 at 10:08 AM, Peter Otten <__pete...@web.de> wrote: Huhuai Fan wrote: > Thanks for your help,

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Seymore4Head
On Sun, 02 Nov 2014 19:42:49 +, Mark Lawrence wrote: >On 02/11/2014 19:10, Seymore4Head wrote: >> On Sun, 2 Nov 2014 12:16:11 -0500, Joel Goldstick >> wrote: >> >>> On Sun, Nov 2, 2014 at 10:08 AM, Peter Otten <__pete...@web.de> wrote: Huhuai Fan wrote: > Thanks for your help,

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Ned Batchelder
On 11/2/14 3:08 PM, Terry Reedy wrote: > I can post the Traceback but all it says is that it doesn't recognise any input with 'html5lib' in it. I will post the console response if it is important, but I can't see how it is relevan t to my request - which is how do I get these 'treebuilder/ pars

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Terry Reedy
On 11/2/2014 9:58 AM, Simon Evans wrote: Dear Terry Reedy I am using operating system Windows 7. I put the HTML TreeBuilder / htm5 library into the Python2.7 folder. Both packages should go in python27/Lib/site-packages, where a 'package' equals a directory with a __init__.py module. I read

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Mark Lawrence
On 02/11/2014 19:10, Seymore4Head wrote: On Sun, 2 Nov 2014 12:16:11 -0500, Joel Goldstick wrote: On Sun, Nov 2, 2014 at 10:08 AM, Peter Otten <__pete...@web.de> wrote: Huhuai Fan wrote: Thanks for your help, but i have no idea to find a project that i can complete,i am now in perplexed for

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Mark Lawrence
On 02/11/2014 19:22, Simon Evans wrote: I have got the html5lib-0.999.tar.gz and the HTMLParser-0.0.2.tar.gz files in my Downloads the problem is how I install them to Python2.7. The lxml-3.3.3.win32-py2.7 is an exe file, which upon clicking will install but obviously the html and the html5 i

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Simon Evans
I have got the html5lib-0.999.tar.gz and the HTMLParser-0.0.2.tar.gz files in my Downloads the problem is how I install them to Python2.7. The lxml-3.3.3.win32-py2.7 is an exe file, which upon clicking will install but obviously the html and the html5 installations are not so straightforwa

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Seymore4Head
On Sun, 2 Nov 2014 12:16:11 -0500, Joel Goldstick wrote: >On Sun, Nov 2, 2014 at 10:08 AM, Peter Otten <__pete...@web.de> wrote: >> Huhuai Fan wrote: >> >>> Thanks for your help, but i have no idea to find a project that i can >>> complete,i am now in perplexed for what to do >> >> Then write a s

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Simon Evans
Dear Mark Lawrence, I have tried inputting the code in the first link, re: >>> import lxml >>> import lxml.etree >>> import bs4.builder.htmlparser Traceback (most recent call last): File "", line 1, in ImportError: No module named htmlparser >>> import bs4.builder._lxml >>> import bs4.builder.h

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Grant Edwards
On 2014-11-02, Chris Angelico wrote: > On Sun, Nov 2, 2014 at 11:31 AM, Grant Edwards > wrote: >> On 2014-11-01, alister wrote: >> >> "The IETF motto is 'rouch consesus and running code'" >> >> -- Scott Bradner (Open Sources, 1999 O'Reilly and Associates) >> >> I don't get it, and googling di

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Abhiram
>> >> > > If you like math puzzles you can do the euler project stuff > > -- > Joel Goldstick > http://joelgoldstick.com > -- > https://mail.python.org/mailman/listinfo/python-list Ooh. I had to jump onboard to defend this. Project Euler is an absolute delight to do with Python :) You sho

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Joel Goldstick
On Sun, Nov 2, 2014 at 10:08 AM, Peter Otten <__pete...@web.de> wrote: > Huhuai Fan wrote: > >> Thanks for your help, but i have no idea to find a project that i can >> complete,i am now in perplexed for what to do > > Then write a small text-based brainstorming app! > > -- > https://mail.python.or

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Mark Lawrence
On 02/11/2014 15:23, Simon Evans wrote: I have proceeded to click on the 'setup.py' in the html5-0.999 lib and got a python console for a few seconds, this may have been the installation of the HTML5 parser/ treebuilder - I will have to put the code that did not work to it previously to it aga

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Mark Lawrence
On 02/11/2014 14:58, Simon Evans wrote: Dear Terry Reedy I am using operating system Windows 7. I put the HTML TreeBuilder / htm5 library into the Python2.7 folder. I read that the LXML Treebuilder /lmxl installs itself automatically to the Python2.7 installation, so that is why I am not having

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Simon Evans
I have proceeded to click on the 'setup.py' in the html5-0.999 lib and got a python console for a few seconds, this may have been the installation of the HTML5 parser/ treebuilder - I will have to put the code that did not work to it previously to it again, hopefully it will. -- https://mail.

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Peter Otten
Huhuai Fan wrote: > Thanks for your help, but i have no idea to find a project that i can > complete,i am now in perplexed for what to do Then write a small text-based brainstorming app! -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-02 Thread Simon Evans
Dear Terry Reedy I am using operating system Windows 7. I put the HTML TreeBuilder / htm5 library into the Python2.7 folder. I read that the LXML Treebuilder /lmxl installs itself automatically to the Python2.7 installation, so that is why I am not having difficulty with that installation. I

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-02 Thread Huhuai Fan
在 2014年11月2日星期日UTC+8上午8时31分39秒,Grant Edwards写道: > On 2014-11-01, alister wrote: > > "The IETF motto is 'rouch consesus and running code'" > > -- Scott Bradner (Open Sources, 1999 O'Reilly and Associates) > > I don't get it, and googling didn't help. What is "rouch" consensus? > > -- > Gran

Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py?

2014-11-02 Thread Cyd Haselton
On Sat, Nov 1, 2014 at 5:25 PM, Ned Deily wrote: > In article > , > Cyd Haselton wrote: >> On Sat, Nov 1, 2014 at 1:47 PM, Cyd Haselton wrote: > [...] >> > Sure enough, nm -D libm.so shows that sincos is NOT available in that >> > library on my Android device. Now to figure out what to do about

Re: Classes

2014-11-02 Thread Denis McMahon
On Sun, 02 Nov 2014 21:32:13 +1100, Tim Delaney wrote: > On 2 November 2014 20:50, Denis McMahon > wrote: > >> The question (I thought) was to write a class for Square that inherited >> a class Rectangle but imposed on it the additional constraints of a >> square over a rectangle, namely that le

Re: Classes

2014-11-02 Thread Gregory Ewing
Steven D'Aprano wrote: Like all good Pythonistas[1], we hate Java and think that getter/setter methods are pointless. But come on, they're not *wrong*, What's wrong is the statement that getters and setters are necessary to allow the implementation to change without changing the interface. That

Re: Classes

2014-11-02 Thread Tim Delaney
On 2 November 2014 20:50, Denis McMahon wrote: > > The question (I thought) was to write a class for Square that inherited a > class Rectangle but imposed on it the additional constraints of a square > over a rectangle, namely that length == width. > I'm late to the party and this has already be

Re: Classes

2014-11-02 Thread Denis McMahon
On Sat, 01 Nov 2014 12:42:10 -0400, Seymore4Head wrote: > OK Maybe I misunderstood the question. > > My answer to you then is ..I don't know. I will have to think about > it some more. The question (I thought) was to write a class for Square that inherited a class Rectangle but imposed on