[Tutor] ElementTree, TidyHTMLTreeBuilder, find

2005-12-13 Thread Bob Tanner
Having problem understanding how find() works. The html file I'm using is attached. Python 2.4.2 (No.2, Nov 20 2005, 17:04:48) >>> from elementtidy import TidyHTMLTreeBuilder >>> doc = TidyHTMLTreeBuilder.parse('048229.html') >>> root = doc.getroot() >>> print root.find('html/body') None >>> pri

Re: [Tutor] better way to make __repr__ methods for family of similar classes

2005-12-13 Thread Brian van den Broek
Kent Johnson said unto the world upon 2005-12-13 20:57: > See Guido's "Unifying Types and Classes" essay and PEP 253 for details. > And ask questions - maybe if I answer enough questions I will understand > this stuff! > http://www.python.org/2.2.3/descrintro.html#metaclasses > http://www.pyt

Re: [Tutor] Editors

2005-12-13 Thread Steven Bell
Here's my two cents on ide's for Python. Idle... It's got a nice color scheme but it's tkinter gui is a bit dated and it's short many of the built-in convenience features. PyWin... Slightly better, but still feels weak to me. Win32 specific though. PyCrust (and it's derivatives) last I knew were i

Re: [Tutor] better way to make __repr__ methods for family of similar classes

2005-12-13 Thread Kent Johnson
Brian van den Broek wrote: > Kent Johnson said unto the world upon 2005-12-13 16:34: >>You can use self.__class__.__module__ and self.__class__.__name__ >>instead of parsing str(self.__class__). > > thanks! I knew there had to be an easier way that the manual parse. I > tried to find it with dir

Re: [Tutor] better way to make __repr__ methods for family of similar classes

2005-12-13 Thread Brian van den Broek
Kent Johnson said unto the world upon 2005-12-13 16:34: > Brian van den Broek wrote: > >>Hi all, >> >>I think I must be doing something incorrectly. I have a family of >>classes that all have the same arguments to their __init__ methods. >> >>I want to give them all __repr__ methods. From the doc

Re: [Tutor] better way to make __repr__ methods for family of similar classes

2005-12-13 Thread Kent Johnson
Brian van den Broek wrote: > Hi all, > > I think I must be doing something incorrectly. I have a family of > classes that all have the same arguments to their __init__ methods. > > I want to give them all __repr__ methods. From the docs, this method > should be written so that it looks like "a

[Tutor] better way to make __repr__ methods for family of similar classes

2005-12-13 Thread Brian van den Broek
Hi all, I think I must be doing something incorrectly. I have a family of classes that all have the same arguments to their __init__ methods. I want to give them all __repr__ methods. From the docs, this method should be written so that it looks like "a valid Python expression that could be us

Re: [Tutor] Editors

2005-12-13 Thread Norman Silverstone
> sorry for the self reply. I got motivated and largely got SPE to use > the IDLE colour scheme. I've emailed it to Ismael. If anyone else want > is, write me privately. Just out of interest I use Ubuntu Linux and gedit is the editor. Norman ___ Tut

Re: [Tutor] Editors

2005-12-13 Thread Brian van den Broek
Brian van den Broek said unto the world upon 2005-12-13 12:23: > Ismael Garrido said unto the world upon 2005-12-12 23:07: >>BTW: Does anyone know how to change the color configuration? I really >>like IDLE's one.. Kinda grew up with that one, I'd love to see it in SPE >> >>Ismael > > > > Hi

Re: [Tutor] Editors

2005-12-13 Thread Brian van den Broek
Ismael Garrido said unto the world upon 2005-12-12 23:07: > Will Harris wrote: > > >>Any of you familar with SPE >> >>? I found this just recently on freshmeat and was curious if anyone >>had used it? If so how well it works