Re: [Tutor] ElementTree: finding a tag with specific attribute

2005-09-19 Thread Kent Johnson
Kent Johnson wrote: > I looked at this again and there is a bug in BS that causes this > behaviour. It's kind of an interesting bug that is a side-effect of > the way BS uses introspection to access child tags. There is a new release of BS that fixes this problem and one Danny found recently (bro

Re: [Tutor] ElementTree: finding a tag with specific attribute

2005-09-19 Thread Bernard Lebel
Thanks a lot everyone for this! Glad I could help debug BS! Bernard On 9/19/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > Kent Johnson wrote: > > I looked at this again and there is a bug in BS that causes this > > behaviour. It's kind of an interesting bug that is a side-effect of > > the way

Re: [Tutor] ElementTree: finding a tag with specific attribute

2005-09-19 Thread grouchy
Now I can replace my my Kent-and-Danny patched version :)On 9/19/05, Bernard Lebel <[EMAIL PROTECTED]> wrote: Thanks a lot everyone for this! Glad I could help debug BS!Bernard On 9/19/05, Kent Johnson <[EMAIL PROTECTED]> wrote:> Kent Johnson wrote:> > I looked at this again and there is a bug in B

Re: [Tutor] IRC Client Trouble -- too many new lines

2005-09-19 Thread Joseph Quigley
Hi, Liam Clarke-Hutchinson wrote: Hi Joseph, while (1): buffer = Data.IRC.recv(1024) msg = string.split(buffer) Just a warning, the string module will be removed/deprecated come Py3K. Better to use - buffer.split() nick_name = msg[0][:msg[0].find("!")] filetxt.w

Re: [Tutor] ElementTree: finding a tag with specific attribute

2005-09-19 Thread Bernard Lebel
Well I have just retested BS with my XML file and now it's much, much faster (I would say instantaneous). Bernard On 9/19/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > Kent Johnson wrote: > > I looked at this again and there is a bug in BS that causes this > > behaviour. It's kind of an intere

Re: [Tutor] tuples and mysqldb tables (fwd)

2005-09-19 Thread Danny Yoo
[Again forwarding to tutor. Ed, please keep tutor@python.org in CC; otherwise, your questions might lose themselves in my mailbox. I don't want to be a bottleneck in your learning.] -- Forwarded message -- Date: Mon, 19 Sep 2005 00:06:13 -0400 From: Ed Hotchkiss <[EMAIL PROTECTED

Re: [Tutor] More IDE's (was: Boa-Constructor)

2005-09-19 Thread George Flaherty
Well, for starters. 1. PyDEV does not have any type of prespective. I use the java prespective or resources. 2. Check out this guide, granted it is a bit old(2003'ish) but it is still pretty good. http://www-128.ibm.com/developerworks/opensource/library/os-ecant/ 3. Terry, what do you mean by

Re: [Tutor] tuples and mysqldb tables (fwd)

2005-09-19 Thread Danny Yoo
> Thanks for the debugging help :P - I've edited the error handling line, and > defined the port_counter above, but I am still not getting any output. I > have inserted print "scanned: ",port_counter,"\n" > into the thread, so that should at least print to screen each time the > thread is ran, re

Re: [Tutor] Port scanner (was: tuples and mysqldb tables)

2005-09-19 Thread Kent Johnson
Danny Yoo wrote: > [Again forwarding to tutor. Ed, please keep tutor@python.org in CC; > otherwise, your questions might lose themselves in my mailbox. I don't > want to be a bottleneck in your learning.] > > -- Forwarded message -- > Date: Mon, 19 Sep 2005 00:06:13 -0400 > From:

Re: [Tutor] tuples and mysqldb tables (fwd)

2005-09-19 Thread Ed Hotchkiss
Thanks for the link! It is EXACTLY what I have been looking for. When I used to use Flash a bit, and did some actionscript they had a similiar setup for OOP (Do all languages use OOP so similiarly?) which I never learned. I'm doing these examples, and now I'm going to try and rework the code from t

Re: [Tutor] More IDE's (was: Boa-Constructor)

2005-09-19 Thread ->Terry<-
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Reply in-line. Today (Sep 19, 2005) at 2:21pm, George Flaherty spoke these wise words: - ->Well, for starters. - -> - ->1. PyDEV does not have any type of prespective. I use the java prespective or resources. - -> - ->2. Check out this guide, grant

[Tutor] OOP fundamentals

2005-09-19 Thread Danny Yoo
On Mon, 19 Sep 2005, Ed Hotchkiss wrote: > Thanks for the link! It is EXACTLY what I have been looking for. When I > used to use Flash a bit, and did some actionscript they had a similiar > setup for OOP (Do all languages use OOP so similiarly?) which I never > learned. Hi Ed, I believe that

Re: [Tutor] OOP fundamentals

2005-09-19 Thread Ed Hotchkiss
Thanks Danny! Tommorrow I am off to get "Programming for Python, 2nd edition" and learn everything - all of it, before I even bother with Sockets. Afterall, I want python for EVERYTHING not just sockets and inet based scripts/applications.   I realized that I need to take a step back, make port s

[Tutor] Timer on CGI

2005-09-19 Thread Adam Cripps
Some of my pupils at school are working through simple mathematic problems (multiplication tables) through my website. I basically show some tables, they enter the results and then get feedback on how they did. I have two questions - and my guess is that one will be easier than the other. 1. I w

Re: [Tutor] Why won't it enter the quiz?

2005-09-19 Thread Adam
You're not returning the values of answer and guess so it jumps out of the while loop and does the else. Try this: def add(a,b):     answer = a+b     guess = float(raw_input(a," + ",b," = "))     return answer, guess answer, guess = add(num1,num2) if guess != answer:On 17/09/05, Nathan Pinno <[

Re: [Tutor] OOP fundamentals

2005-09-19 Thread Danny Yoo
On Mon, 19 Sep 2005, Ed Hotchkiss wrote: > Thanks Danny! Tommorrow I am off to get "Programming for Python, 2nd > edition" and learn everything - all of it, before I even bother with > Sockets. Hi Ed, I'd disrecommend Programming Python if you're a beginner. Programming Python is really more

Re: [Tutor] Timer on CGI

2005-09-19 Thread Christopher Arndt
Adam Cripps schrieb: > Some of my pupils at school are working through simple mathematic > problems (multiplication tables) through my website. I basically show > some tables, they enter the results and then get feedback on how they > did. > > I have two questions - and my guess is that one will b

Re: [Tutor] Timer on CGI

2005-09-19 Thread Alan Gauld
> 1. I want to store the results in a mySQL database - I've done > this > kind of thing before using PHP - are there any good tutorial > resources > for using mysql with python? There is a generic DB API howto document and I have a database topic in my tutor which uses SQLite but the basic princ

Re: [Tutor] IRC Client Trouble -- too many new lines

2005-09-19 Thread Liam Clarke-Hutchinson
Hi Joseph, I'm unable to cc to the Python list from this address, so I'll try my forwarding address. >Example: >this >is >the >type >of >message >I'm >getting >and >as >you >can >see >, >it's >really >annoying! You know that 'print' adds a newline? You could either use - import sys sys.std

Re: [Tutor] OOP fundamentals

2005-09-19 Thread Ed Hotchkiss
Excellent, I'll be getting that book tomorrow! Thanks again, I'm doing a tutorial as we speak!   On 9/19/05, Danny Yoo <[EMAIL PROTECTED]> wrote: On Mon, 19 Sep 2005, Ed Hotchkiss wrote:> Thanks Danny! Tommorrow I am off to get "Programming for Python, 2nd > edition" and learn everything - all of i

Re: [Tutor] Any suggestions for optimizing this code?

2005-09-19 Thread grouchy
Replying to myself, I got some speedups by replacing:def makeArray1(matrix):    result = matrix    result[0][w/2] = 1    for row in range(h-1):    last = result[row]    next = result[row+1]     for i in range(w-1):     next[i] = rule[4*last[i-1]+2*last[i]+last[i+1]]    next[

Re: [Tutor] Timer on CGI

2005-09-19 Thread Adam Cripps
On 9/19/05, Alan Gauld <[EMAIL PROTECTED]> wrote: > > 1. I want to store the results in a mySQL database - I've done > > this > > kind of thing before using PHP - are there any good tutorial > > resources > > for using mysql with python? > > There is a generic DB API howto document and I have a da

Re: [Tutor] OOP fundamentals

2005-09-19 Thread János Juhász
ng that isn't quite so simple! > Thanks again everyone thats been helping me out especially danny! > -edward > -- next part -- > An HTML attachment was scrubbed... > URL: http://mail.python. > org/pipermail/tutor/attachments/20050919/41d24153/attachment.