Re: [Tutor] Re: Are you allowed to shoot camels? [kinda OT]

2005-02-03 Thread Patrick Hall
> Beware! Overcome the temptation! > Try this: http://kodos.sourceforge.net/ While I have no problem personally with Perl or PHP, I'll second the recommendation for kodos -- it's very useful for learning to use regexes in Python. ___ Tutor maillist - T

Re: [Tutor] How to create a key-value pairs with alternative elements in a list ... please help.

2005-01-16 Thread Patrick Hall
Hi! >>> while True: > ... try: > ... d[slice0.next()] = slice1.next() > ... except: StopIteration > ... break > ... ### while True: try: d[s0.next()] = s1.next() except StopIteration: # wherein we point out a wayward colon break ### Took me a while to figure out

Re: [Tutor] simple list query

2005-01-02 Thread Patrick Hall
Hi Dave, > I have a list consisting of about 250 items, I need to know if a > particular item is in the list. I know this is better suited to a > dictionary but thats not the way it ended up ;-) > I could do a for loop to scan the list & compare each one, but I have a > suspission that there is

[Tutor] Non-escaped utf-8 rendering in the interactive shell under XP?

2004-12-13 Thread Patrick Hall
Hi folks, Being a Linux guy, I don't know my way around Windows software too well. I've been trying to help some friends learn a bit of Python, and they use OSX and XP. OSX is close enough to Linux that I've not run into many barriers, but I'm having a specific problem with the XP users: Is ther