[Tutor] Parsing html user HTMLParser

2006-04-20 Thread ទិត្យវិរៈ
Hi folks, I need help here, I'm struggling with html parsing method, up until now I can only put and html file as instance. I have no experience with this, I want to read the childs inside this document and modify the data. What can I do if I start from here? from HTMLParser import HTMLParser

Re: [Tutor] Brain In Vice: Why is this so fun to me?

2006-04-20 Thread Liam Clarke
Yeah, Alan's tutorial is what I used to learn how to code, it's very good. Regexes are very powerful; which can be a very good thing and a very bad thing. ;) Good luck. On 4/20/06, doug shawhan [EMAIL PROTECTED] wrote: Got it! Thanks! Mr. Gald hooked me up with his re tutorial as well. Great!

[Tutor] pyExcelerator for Python 2.3

2006-04-20 Thread Justin Ezequiel
Does anyone know where I can get pyExcelerator for Python 2.3? I have not yet updated my development machine to 2.4. Thanks in advance. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Use iterator to refer to an object's attribute?

2006-04-20 Thread Kent Johnson
Ron Britton wrote: Short version: How do I use an iterator to refer to an object's attribute? E.g., z is a list of attributes of b: for x, y in z: for a in b.x.y getattr(b, 'foo') is the same as b.foo. getattr takes a string for the name of the attribute. So you would need

Re: [Tutor] pyExcelerator for Python 2.3

2006-04-20 Thread Kent Johnson
Justin Ezequiel wrote: Does anyone know where I can get pyExcelerator for Python 2.3? I have not yet updated my development machine to 2.4. - look through the past releases on sourceforge - ask on the pyExcelerator list - hack the current release to work on 2.3 - most of what is new in 2.4 can

Re: [Tutor] Parsing html user HTMLParser

2006-04-20 Thread Kent Johnson
ទិត្យវិរៈ wrote: Hi folks, I need help here, I'm struggling with html parsing method, up until now I can only put and html file as instance. I have no experience with this, I want to read the childs inside this document and modify the data. What can I do if I start from here? from

Re: [Tutor] Splitting a number into even- and odd- numbered digits

2006-04-20 Thread Python
On Wed, 2006-04-19 at 17:17 -0700, Carroll, Barry wrote: Greetings: I am writing a function that accepts a string of decimal digits, calculates a checksum and returns it as a single character string. The first step in the calculation is to split the input into two strings: the even- and

Re: [Tutor] Version of a .pyc file

2006-04-20 Thread Terry Carroll
On Wed, 19 Apr 2006, Don Taylor wrote: But my underlying problem still occurs: somewhere somebody is calling for the 2.3 version of the Python vm .dll and not finding it. This is happening under Pydev/Eclipse and my only recourse is to blow Eclipse away using Task Manager. Don -- I've

[Tutor] Tutor FAQ?

2006-04-20 Thread Mike Hansen
I'd like to send a big Thank You to Danny, Alan, Kent and others(whos names escape me) for being such an asset to the Python community by relentlessly answering questions on the tutor list.(Do these guys sleep? They must work in shifts.) This list is one of the most civilized and responsive lists

Re: [Tutor] Use iterator to refer to an object's attribute?

2006-04-20 Thread Alan Gauld
Dictionaries are only pairs of data. I assume a list can be one of those elements, but I couldn't figure out how to make it work in the structure I presented. Yes, the object that is stored can be anything. Thus numList = [1,2,3] chrList = ['1','2','3'] numDict = {} numDict['asNum'] =

[Tutor] Config file parsing

2006-04-20 Thread Tino Dai
Hi Everybody, Before I start reinventing the wheel, is there any code out there for parsing configuration filesn in paragraph format. I am creating a multi-process monitor that will read in a configuration file that will contain the processes that they will monitor also what to do when they get

Re: [Tutor] Config file parsing

2006-04-20 Thread Kent Johnson
Tino Dai wrote: Hi Everybody, Before I start reinventing the wheel, is there any code out there for parsing configuration filesn in paragraph format. I am creating a multi-process monitor that will read in a configuration file that will If you have control over the config file

Re: [Tutor] Tutor FAQ?

2006-04-20 Thread Kent Johnson
Mike Hansen wrote: I'd like to send a big Thank You to Danny, Alan, Kent and others(whos names escape me) for being such an asset to the Python community by relentlessly answering questions on the tutor list.(Do these guys sleep? They must work in shifts.) This list is one of the most

Re: [Tutor] Tutor FAQ?

2006-04-20 Thread Eric Walker
Kent Johnson wrote: Mike Hansen wrote: I'd like to send a big Thank You to Danny, Alan, Kent and others(whos names escape me) for being such an asset to the Python community by relentlessly answering questions on the tutor list.(Do these guys sleep? They must work in shifts.) This list is

[Tutor] FW: Splitting a number into even- and odd- numbered digits

2006-04-20 Thread Carroll, Barry
Greetings: First of all, thanks to those who contributed suggestions. Unfortunately, my description was incomplete. I am writing a function that accepts a string of decimal digits, calculates a checksum and returns it as a single character string. The first step in the calculation is to

Re: [Tutor] Splitting a number into even- and odd- numbered digits

2006-04-20 Thread Carroll, Barry
Greetings: First of all, thanks to those who contributed suggestions. Unfortunately, my description was incomplete. I am writing a function that accepts a string of decimal digits, calculates a checksum and returns it as a single character string. The first step in the calculation is to

Re: [Tutor] Splitting a number into even- and odd- numbered digits

2006-04-20 Thread Carroll, Barry
Greetings: Unfortunately, my problem description was incomplete. I forgot to include two important requirements: 1. the length of the input string is arbitrary, 2. the order of the digits must be maintained. I could not find a way to include these requirements in a single, simple

Re: [Tutor] FW: Splitting a number into even- and odd- numbered digits

2006-04-20 Thread Terry Carroll
On Thu, 20 Apr 2006, Carroll, Barry wrote: The first step in the calculation is to split the input into two strings: the even- and odd- numbered digits, respectively. The least significant digit is defined as odd. I forgot to include two important requirements: 1. the length

Re: [Tutor] Tutor FAQ?

2006-04-20 Thread Alan Gauld
I'd like to send a big Thank You to Danny, Alan, Kent and others Over the years there have been many, some have moved from tutor list to c.l.python others have just got too busy. Others reappear and then disappear again at intervals. (Who remembers Ivan, Gregor, Magnus etc etc.) answering

Re: [Tutor] Tutor FAQ?

2006-04-20 Thread Mike Hansen
Thanks! I do sleep but I have my email tied in to my clock radio so whenever an email arrives on the tutor list I am awakened to answer it ;) Hmmm.. I wouldn't be surprised if there's an X10 module that does that. =) [...] Maybe this could be integrated with the main Python FAQ in a

Re: [Tutor] Parsing html user HTMLParser

2006-04-20 Thread Danny Yoo
I need help here, I'm struggling with html parsing method, up until now I can only put and html file as instance. I have no experience with this, I want to read the childs inside this document and modify the data. What can I do if I start from here? Hi Titvirak, You might want to take a

Re: [Tutor] Use iterator to refer to an object's attribute?

2006-04-20 Thread Ron Britton
I wanted to make the methods flexible enough that I wouldn't have to edit every method if the module list ever changed. I guess I don't understand how a dictionary works in this situation. I don;t understand what you don;t understand here. Can you expand on why you don't think a

Re: [Tutor] Brain In Vice: Why is this so fun to me?

2006-04-20 Thread Liam Clarke
Trick is, to limit them very carefully by specifying what they are to match. Watch .* - I always use .*? myself. For instance, for one of your strings, which ends with the ESC=single characterk(some whitespace or not)0 \x1b.*?0 would certainly match that, but it'd also match ESC foo ### #

Re: [Tutor] Brain In Vice: Why is this so fun to me?

2006-04-20 Thread Kent Johnson
Liam Clarke wrote: Whereas \x1b\=.k\w*?0 would match it far more precisely, because that's the regex for esc=single character*ksome whitespace, maybe0 Slight correction: \w means any 'Word' character - alphanumeric plus underscore. \s matches whiteSpace. Kent

Re: [Tutor] GUI

2006-04-20 Thread Liam Clarke
Tkinter is simpler to use, wxPython is far more powerful but a bit harder to learn. It's based on the C++ library wxWidgets, and sometimes the abstraction leaks a bit, but this is just my opinion. Check out pythoncard though, it simplifies wx development dramatically; even has a drag and drop

Re: [Tutor] Brain In Vice: Why is this so fun to me?

2006-04-20 Thread Liam Clarke
Argh, Kent's right. In my defense, I've only had one coffee so far. On 4/21/06, Kent Johnson [EMAIL PROTECTED] wrote: Liam Clarke wrote: Whereas \x1b\=.k\w*?0 would match it far more precisely, because that's the regex for esc=single character*ksome whitespace, maybe0 Slight

Re: [Tutor] Version of a .pyc file

2006-04-20 Thread Don Taylor
Kent Johnson wrote: Don Taylor wrote: Finally, are there any other possible file extension types that I should be looking at? .pyo is like a .pyc but compiled with optimizations on. Hi Kent: No, I really meant a .pyd file which is Python's name for a .dll which conforms to the Python

Re: [Tutor] Version of a .pyc file

2006-04-20 Thread Don Taylor
Terry Carroll wrote: On Wed, 19 Apr 2006, Don Taylor wrote: But my underlying problem still occurs: somewhere somebody is calling for the 2.3 version of the Python vm .dll and not finding it. This is happening under Pydev/Eclipse and my only recourse is to blow Eclipse away using Task

[Tutor] A simple solution to the even/odd problem

2006-04-20 Thread Jesse
Hey, I'm a Python newbie, and I'm not even sure I've correctly interpreted the problem, but from what I gather the idea is to take an integer with an arbitrary number of digits and return two [strings/lists/tuples/whatever]: one containing all of the odd digits, and another containing all of the

Re: [Tutor] pyExcelerator for Python 2.3

2006-04-20 Thread Justin Ezequiel
there is a patch submitted there that you can apply to the current release to make it compatible with 2.4. Thanks lots Poor Yorick. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor