[Tutor] on mailing list

Jerry Brady hiddenworlds@hotmail.com
Thu, 01 Aug 2002 16:40:24 +0000


<html><div style='background-color:'><DIV>
<P>Hi:</P>
<P>Is there anyone thats from Kentucky on your mailing list.. Like to find someone closes to me in</P>
<P>kentucky<BR><BR>Thanks</P>
<P>Jerry</P></DIV>
<DIV></DIV>
<DIV></DIV>&gt;From: tutor-request@python.org 
<DIV></DIV>&gt;Reply-To: tutor@python.org 
<DIV></DIV>&gt;To: tutor@python.org 
<DIV></DIV>&gt;Subject: Tutor digest, Vol 1 #1807 - 10 msgs 
<DIV></DIV>&gt;Date: Thu, 01 Aug 2002 12:00:05 -0400 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Send Tutor mailing list submissions to 
<DIV></DIV>&gt; tutor@python.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;To subscribe or unsubscribe via the World Wide Web, visit 
<DIV></DIV>&gt; http://mail.python.org/mailman/listinfo/tutor 
<DIV></DIV>&gt;or, via email, send a message with subject or body 'help' to 
<DIV></DIV>&gt; tutor-request@python.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;You can reach the person managing the list at 
<DIV></DIV>&gt; tutor-admin@python.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;When replying, please edit your Subject line so it is more specific 
<DIV></DIV>&gt;than "Re: Contents of Tutor digest..." 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Today's Topics: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 1. Re: listdir, ispath and unicode (followup question) (Danny Yoo) 
<DIV></DIV>&gt; 2. Re: Use? Abuse? Amusement? Amendments? (Kalle Svensson) 
<DIV></DIV>&gt; 3. Problem - how to solve it ? (A) 
<DIV></DIV>&gt; 4. Re: Problem - how to solve it ? (Matthew Sherborne) 
<DIV></DIV>&gt; 5. Re: Use? Abuse? Amusement? Amendments? (Gregor Lingl) 
<DIV></DIV>&gt; 6. SCP / SFTP (Aris Santillan) 
<DIV></DIV>&gt; 7. Re: Tkinter Editor (Dan Shafer) 
<DIV></DIV>&gt; 8. Skipping elements from inside generator loops (Scot W. Stevenson) 
<DIV></DIV>&gt; 9. Re: Skipping elements from inside generator loops (ibraheem umaru-mohammed) 
<DIV></DIV>&gt; 10. Meeester bell. (Doug.Shawhan@gecits.ge.com) 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 1 
<DIV></DIV>&gt;Date: Wed, 31 Jul 2002 15:04:44 -0700 (PDT) 
<DIV></DIV>&gt;From: Danny Yoo <DYOO@HKN.EECS.BERKELEY.EDU>
<DIV></DIV>&gt;To: Poor Yorick <GP@POORYORICK.COM>
<DIV></DIV>&gt;cc: tutor@python.org 
<DIV></DIV>&gt;Subject: Re: [Tutor] listdir, ispath and unicode (followup question) 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;On Wed, 31 Jul 2002, Poor Yorick wrote: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; &gt; I am running Windows 2000 English edition. The filename contains 
<DIV></DIV>&gt; &gt; cyrillic characters typed with a standard Windows 2000 IME when I 
<DIV></DIV>&gt; &gt; created the file. Here is the result of your suggestion: 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; filename = os.path.join(os.getcwd(), os.listdir(os.getcwd())[0]) 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; &gt;&gt;&gt; filename 
<DIV></DIV>&gt; &gt; 'd:\\tmp2\\???????' 
<DIV></DIV>&gt; &gt; &gt;&gt;&gt; os.stat(filename) 
<DIV></DIV>&gt; &gt; Traceback (most recent call last): 
<DIV></DIV>&gt; &gt; File "<PYSHELL#5>", line 1, in ? 
<DIV></DIV>&gt; &gt; os.stat(filename) 
<DIV></DIV>&gt; &gt; OSError: [Errno 2] No such file or directory: 'd:\\tmp2\\???????' 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Hmmm... now I'm suspecting that the cyrillic characters might be making a 
<DIV></DIV>&gt;difference. I did a scan through the Python Enhancement Proposal 277: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; http://www.python.org/peps/pep-0277.html 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;which implies that Unicode filenames might not work out-of-the-box. If 
<DIV></DIV>&gt;your locale at that point where you're running the Python script isn't 
<DIV></DIV>&gt;Cyrillic, that can potentially cause problems. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;The PEP above provides an implementation that's supposed to handle Unicode 
<DIV></DIV>&gt;filenames properly, without the intermediate LOCALE translation stuff; can 
<DIV></DIV>&gt;you see if this works for you? Sorry about the roundabout way of 
<DIV></DIV>&gt;answering your question. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 2 
<DIV></DIV>&gt;Date: Thu, 1 Aug 2002 00:26:41 +0200 
<DIV></DIV>&gt;From: Kalle Svensson <KALLE@LYSATOR.LIU.SE>
<DIV></DIV>&gt;To: tutor@python.org 
<DIV></DIV>&gt;Subject: Re: [Tutor] Use? Abuse? Amusement? Amendments? 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;-----BEGIN PGP SIGNED MESSAGE----- 
<DIV></DIV>&gt;Hash: SHA1 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;[Sean 'Shaleh' Perry] 
<DIV></DIV>&gt; &gt; where does one get turtle? 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;It seems to be a part of the standard library. 
<DIV></DIV>&gt;http://www.python.org/doc/current/lib/module-turtle.html 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Peace, 
<DIV></DIV>&gt; Kalle 
<DIV></DIV>&gt;- -- 
<DIV></DIV>&gt;Kalle Svensson, http://www.juckapan.org/~kalle/ 
<DIV></DIV>&gt;Student, root and saint in the Church of Emacs. 
<DIV></DIV>&gt;-----BEGIN PGP SIGNATURE----- 
<DIV></DIV>&gt;Version: GnuPG v1.0.7 (GNU/Linux) 
<DIV></DIV>&gt;Comment: Processed by Mailcrypt 3.5.6 <HTTP: mailcrypt.sourceforge.net />
<DIV></DIV>&gt; 
<DIV></DIV>&gt;iD8DBQE9SGQadNeA1787sd0RAngkAKCdbxhdNJd6J4zawWLAYVhbh9vWDwCgtIA4 
<DIV></DIV>&gt;acTGCIaZTaeik061IPDr6BM= 
<DIV></DIV>&gt;=GtY4 
<DIV></DIV>&gt;-----END PGP SIGNATURE----- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 3 
<DIV></DIV>&gt;From: "A" <PRINTERS@SENDME.CZ>
<DIV></DIV>&gt;To: python-list@python.org, tutor@python.org, 
<DIV></DIV>&gt; activepython@listserv.activestate.com, python-help@python.org 
<DIV></DIV>&gt;Reply-to: printers@sendme.cz 
<DIV></DIV>&gt;Date: Wed, 31 Jul 2002 20:54:41 +0200 
<DIV></DIV>&gt;Subject: [Tutor] Problem - how to solve it ? 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Hi, 
<DIV></DIV>&gt;I have a program that I compiled( with Installer) into exe for using 
<DIV></DIV>&gt;on Win32 systems. It works well on Windows Me, Windows 9x but 
<DIV></DIV>&gt;on some computers with Windows 2000 it causes General 
<DIV></DIV>&gt;Protection Error and the programs is finished. It would be nice if the 
<DIV></DIV>&gt;program wrote a line number or something similar that could help a 
<DIV></DIV>&gt;user find out which command caused that General Protection 
<DIV></DIV>&gt;Error. Is there any solution for that? 
<DIV></DIV>&gt;Thank you for help 
<DIV></DIV>&gt;Ladislav 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;_______________________________________________ 
<DIV></DIV>&gt;ActivePython mailing list 
<DIV></DIV>&gt;ActivePython@listserv.ActiveState.com 
<DIV></DIV>&gt;To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 
<DIV></DIV>&gt;Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 4 
<DIV></DIV>&gt;Date: Thu, 01 Aug 2002 10:08:16 +1200 
<DIV></DIV>&gt;From: Matthew Sherborne <MIRACLE@PARADISE.NET.NZ>
<DIV></DIV>&gt;To: printers@sendme.cz 
<DIV></DIV>&gt;Cc: python-list@python.org, tutor@python.org, 
<DIV></DIV>&gt; activepython@listserv.activestate.com, python-help@python.org 
<DIV></DIV>&gt;Subject: [Tutor] Re: Problem - how to solve it ? 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;GPFs are fired when some C code crashes not python code. In the error it 
<DIV></DIV>&gt;should give the name of a DLL or say python.exe. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;To find what part of your code is causing the error, do print messages, 
<DIV></DIV>&gt;or write to a log file in the area around where the program crashes. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Start in the highest level of the code, print a line before and after 
<DIV></DIV>&gt;each sub routine is called, where the print outs stop, go to the sub 
<DIV></DIV>&gt;routine after the last print out and put a bunch of print lines between 
<DIV></DIV>&gt;all the sections in that and re-run. Keep narrowing it down like this. :) 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;It may a bug in some windows DLL, so you could either fix it, or release 
<DIV></DIV>&gt;a "Known Issues.txt" file with the program, letting them know that they 
<DIV></DIV>&gt;must update their windows release if this happens. :) 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;GBU 
<DIV></DIV>&gt;Matthew Sherborne 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;A wrote: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; &gt;Hi, 
<DIV></DIV>&gt; &gt;I have a program that I compiled( with Installer) into exe for using 
<DIV></DIV>&gt; &gt;on Win32 systems. It works well on Windows Me, Windows 9x but 
<DIV></DIV>&gt; &gt;on some computers with Windows 2000 it causes General 
<DIV></DIV>&gt; &gt;Protection Error and the programs is finished. It would be nice if the 
<DIV></DIV>&gt; &gt;program wrote a line number or something similar that could help a 
<DIV></DIV>&gt; &gt;user find out which command caused that General Protection 
<DIV></DIV>&gt; &gt;Error. Is there any solution for that? 
<DIV></DIV>&gt; &gt;Thank you for help 
<DIV></DIV>&gt; &gt;Ladislav 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;_______________________________________________ 
<DIV></DIV>&gt; &gt;ActivePython mailing list 
<DIV></DIV>&gt; &gt;ActivePython@listserv.ActiveState.com 
<DIV></DIV>&gt; &gt;To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 
<DIV></DIV>&gt; &gt;Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 5 
<DIV></DIV>&gt;Date: Thu, 01 Aug 2002 06:40:01 +0200 
<DIV></DIV>&gt;From: Gregor Lingl <GLINGL@AON.AT>
<DIV></DIV>&gt;To: Chris Kassopulo <CKASSO@SPRYNET.COM>, tutor@python.org 
<DIV></DIV>&gt;Subject: Re: [Tutor] Use? Abuse? Amusement? Amendments? 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Chris Kassopulo schrieb: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; &gt;Running Python 2.0.1 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;$ python /home/ckasso/python/turtles.py 
<DIV></DIV>&gt; &gt; File "/home/ckasso/python/turtles.py", line 7 
<DIV></DIV>&gt; &gt; yield 1 
<DIV></DIV>&gt; &gt; ^ 
<DIV></DIV>&gt; &gt;SyntaxError: invalid syntax 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt;Of course, I forgot to mention: trees.py needs Python 2.2 or higher 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;This is because it's intention was (among others) to have some visual 
<DIV></DIV>&gt;representation of how generators work - an those were introduced 
<DIV></DIV>&gt;in Python only with V2.2 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Gregor 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 6 
<DIV></DIV>&gt;From: "Aris Santillan" <ARIS.SANTILLAN@SUMMITMEDIA.COM.PH>
<DIV></DIV>&gt;To: <TUTOR@PYTHON.ORG>
<DIV></DIV>&gt;Date: Thu, 1 Aug 2002 13:38:05 +0800 
<DIV></DIV>&gt;Subject: [Tutor] SCP / SFTP 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Hello guys! 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;im a newbie 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;does anyone had a script for wrapping a SCP / SFTP command 
<DIV></DIV>&gt;in python, coz i want to embed it on a DTML? 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Aris Santillan 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 7 
<DIV></DIV>&gt;Date: Wed, 31 Jul 2002 22:49:06 -0700 
<DIV></DIV>&gt;From: Dan Shafer <PYDAN@DANSHAFER.COM>
<DIV></DIV>&gt;Subject: Re: [Tutor] Tkinter Editor 
<DIV></DIV>&gt;To: tutor@python.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Check out PythonCard (http://www.pythoncard.org), a GUI-creation tool being 
<DIV></DIV>&gt;patterned after the mold of HyperCard and Visual Basic and built on top of 
<DIV></DIV>&gt;wxWindows. While the current release (0.6.8.1) is not commercial software 
<DIV></DIV>&gt;and you need to understand Python coding a bit to get the most out of it, 
<DIV></DIV>&gt;it's quite usable as it is. It comes with a ton of great samples (caveat..I 
<DIV></DIV>&gt;wrote some of them!) and good (though incomplete) docs (another caveat...I 
<DIV></DIV>&gt;wrote most of them). 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;It has its own mailing list, too. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Dan Shafer, Chief Scribe and Tablet Keeper 
<DIV></DIV>&gt;PythonCard Open Source Project 
<DIV></DIV>&gt;http://pythoncard.sourceforge.net 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 8 
<DIV></DIV>&gt;From: "Scot W. Stevenson" <SCOT@POSSUM.IN-BERLIN.DE>
<DIV></DIV>&gt;Organization: Hexenhaus Zepernick 
<DIV></DIV>&gt;To: Tutor <TUTOR@PYTHON.ORG>
<DIV></DIV>&gt;Date: Thu, 1 Aug 2002 11:15:15 +0200 
<DIV></DIV>&gt;Subject: [Tutor] Skipping elements from inside generator loops 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Hello there, 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;So here I am playing around with generators, and just for the heck of it I 
<DIV></DIV>&gt;see if I can get a for-loop to skip one element from inside the loop. To 
<DIV></DIV>&gt;my surprise, this works (in Python 2.2): 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;================================================== 
<DIV></DIV>&gt;from __future__ import generators 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;procession= ['black cat', 
<DIV></DIV>&gt; 'white cat', 
<DIV></DIV>&gt; 'grey cat', 
<DIV></DIV>&gt; 'ALARM!', 
<DIV></DIV>&gt; 'the evil dog', 
<DIV></DIV>&gt; 'fat cat', 
<DIV></DIV>&gt; 'slow cat'] 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;def animal_walk(animal_list): 
<DIV></DIV>&gt; for one_animal in animal_list: 
<DIV></DIV>&gt; yield one_animal 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;cat_parade = animal_walk(procession) 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;for animal in cat_parade: 
<DIV></DIV>&gt; if animal == 'ALARM!': 
<DIV></DIV>&gt; # Skip one animal on list 
<DIV></DIV>&gt; cat_parade.next() 
<DIV></DIV>&gt; else: 
<DIV></DIV>&gt; print animal 
<DIV></DIV>&gt;============================================= 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;This produces: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;=================== 
<DIV></DIV>&gt;black cat 
<DIV></DIV>&gt;white cat 
<DIV></DIV>&gt;grey cat 
<DIV></DIV>&gt;fat cat 
<DIV></DIV>&gt;slow cat 
<DIV></DIV>&gt;=================== 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Somehow, it doesn't seem right to be able to change what amounts to a loop 
<DIV></DIV>&gt;counter from the inside, even though it is useful here. Fooling around 
<DIV></DIV>&gt;some more, I find that you can not do this with "normal" for loops: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;=============================== 
<DIV></DIV>&gt;for a in range(len(procession)): 
<DIV></DIV>&gt; if procession[a] == 'ALARM!': 
<DIV></DIV>&gt; a = a+1 
<DIV></DIV>&gt; else: 
<DIV></DIV>&gt; print procession[a] 
<DIV></DIV>&gt;=============================== 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;lets fido into the fun (in other words, ignores the 'a=a+1'. It only works 
<DIV></DIV>&gt;with a while-loop and a counter: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;=============================== 
<DIV></DIV>&gt;counter = 0 
<DIV></DIV>&gt;while counter &lt; len(procession): 
<DIV></DIV>&gt; if procession[counter] == 'ALARM!': 
<DIV></DIV>&gt; counter = counter+2 
<DIV></DIV>&gt; else: 
<DIV></DIV>&gt; print procession[counter] 
<DIV></DIV>&gt; counter = counter+1 
<DIV></DIV>&gt;=============================== 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Now I'm curious: Is this ability to manipulate generator loops from the 
<DIV></DIV>&gt;inside considered a bug or a feature? It certainly makes the "normal" for 
<DIV></DIV>&gt;loop behave differently than the generator for loop, and that alone seems 
<DIV></DIV>&gt;like a good way to shoot yourself in the foot... 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;[While we're at it: I assume that there is a way to solve the problem with 
<DIV></DIV>&gt;list comprehensions, but I can't figure it out. Note that looking for the 
<DIV></DIV>&gt;dog directly is considered cheating: All you get to do is skip one list 
<DIV></DIV>&gt;entry when somebody sounds the alarm.] 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Thanks again for the help, 
<DIV></DIV>&gt;Y, Scot 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Who is off to feed his own cat 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;-- 
<DIV></DIV>&gt; Scot W. Stevenson -- scot@possum.in-berlin.de -- Zepernick, Germany 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 9 
<DIV></DIV>&gt;Date: Thu, 1 Aug 2002 11:06:33 +0100 
<DIV></DIV>&gt;From: ibraheem umaru-mohammed <IUMARUMO@EIDOSNET.CO.UK>
<DIV></DIV>&gt;To: tutor@python.org 
<DIV></DIV>&gt;Subject: Re: [Tutor] Skipping elements from inside generator loops 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;[Scot W. Stevenson wrote...] 
<DIV></DIV>&gt;<SNIP>...</SNIP> 
<DIV></DIV>&gt;-| 
<DIV></DIV>&gt;-| Somehow, it doesn't seem right to be able to change what amounts to a loop 
<DIV></DIV>&gt;-| counter from the inside, even though it is useful here. Fooling around 
<DIV></DIV>&gt;-| some more, I find that you can not do this with "normal" for loops: 
<DIV></DIV>&gt;-| 
<DIV></DIV>&gt;-| =============================== 
<DIV></DIV>&gt;-| for a in range(len(procession)): 
<DIV></DIV>&gt;-| if procession[a] == 'ALARM!': 
<DIV></DIV>&gt;-| a = a+1 
<DIV></DIV>&gt;-| else: 
<DIV></DIV>&gt;-| print procession[a] 
<DIV></DIV>&gt;-| =============================== 
<DIV></DIV>&gt;-| 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Hmmnn...This works for me: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; ibraheem@ignoramus:$ python2.2 
<DIV></DIV>&gt; Python 2.2.1 (#1, Apr 25 2002, 14:21:58) 
<DIV></DIV>&gt; [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 
<DIV></DIV>&gt; Type "help", "copyright", "credits" or "license" for more information. 
<DIV></DIV>&gt; rlcompleter2 0.9.6 activated 
<DIV></DIV>&gt; &gt;&gt;&gt; procession=['black cat', 
<DIV></DIV>&gt; &gt;&gt;&gt; ... 'white cat', 
<DIV></DIV>&gt; &gt;&gt;&gt; ... 'grey cat', 
<DIV></DIV>&gt; &gt;&gt;&gt; ... 'ALARM!', 
<DIV></DIV>&gt; &gt;&gt;&gt; ... 'evil dog', 
<DIV></DIV>&gt; &gt;&gt;&gt; ... 'fat cat', 
<DIV></DIV>&gt; &gt;&gt;&gt; ... 'slow cat'] 
<DIV></DIV>&gt; &gt;&gt;&gt; for a in range(len(procession)): 
<DIV></DIV>&gt; &gt;&gt;&gt; ... if procession[a] == 'ALARM!': 
<DIV></DIV>&gt; &gt;&gt;&gt; ... a = a + 1 
<DIV></DIV>&gt; &gt;&gt;&gt; ... else: 
<DIV></DIV>&gt; &gt;&gt;&gt; ... print procession[a] 
<DIV></DIV>&gt; &gt;&gt;&gt; ... 
<DIV></DIV>&gt; &gt;&gt;&gt; black cat 
<DIV></DIV>&gt; &gt;&gt;&gt; white cat 
<DIV></DIV>&gt; &gt;&gt;&gt; grey cat 
<DIV></DIV>&gt; &gt;&gt;&gt; evil dog 
<DIV></DIV>&gt; &gt;&gt;&gt; fat cat 
<DIV></DIV>&gt; &gt;&gt;&gt; slow cat 
<DIV></DIV>&gt; &gt;&gt;&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;But I guess most people would use a 'continue' instead: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; &gt;&gt;&gt;for a in range(len(procession)): 
<DIV></DIV>&gt; &gt;&gt;&gt;... if procession[a] == 'ALARM!': 
<DIV></DIV>&gt; &gt;&gt;&gt;... continue 
<DIV></DIV>&gt; &gt;&gt;&gt;... else: 
<DIV></DIV>&gt; &gt;&gt;&gt;... print procession[a] 
<DIV></DIV>&gt; &gt;&gt;&gt;... 
<DIV></DIV>&gt; &gt;&gt;&gt;black cat 
<DIV></DIV>&gt; &gt;&gt;&gt;white cat 
<DIV></DIV>&gt; &gt;&gt;&gt;grey cat 
<DIV></DIV>&gt; &gt;&gt;&gt;evil dog 
<DIV></DIV>&gt; &gt;&gt;&gt;fat cat 
<DIV></DIV>&gt; &gt;&gt;&gt;slow cat 
<DIV></DIV>&gt; &gt;&gt;&gt; 
<DIV></DIV>&gt; &gt;&gt;&gt;procession 
<DIV></DIV>&gt; &gt;&gt;&gt;['black cat', 'white cat', 'grey cat', 'ALARM!', 'evil dog', 'fat cat', 'slow cat'] 
<DIV></DIV>&gt; &gt;&gt;&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;<SNIP>...</SNIP> 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Kindest regards, 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; --ibs. 
<DIV></DIV>&gt;-- 
<DIV></DIV>&gt; ibraheem umaru-mohammed 
<DIV></DIV>&gt; www.micromuse.com 
<DIV></DIV>&gt; --0-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;-- 
<DIV></DIV>&gt; ibraheem umaru-mohammed 
<DIV></DIV>&gt; www.micromuse.com 
<DIV></DIV>&gt; --0-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Message: 10 
<DIV></DIV>&gt;From: Doug.Shawhan@gecits.ge.com 
<DIV></DIV>&gt;To: tutor@python.org 
<DIV></DIV>&gt;Date: Thu, 1 Aug 2002 10:40:57 -0400 
<DIV></DIV>&gt;Subject: [Tutor] Meeester bell. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;I have been looking through the modules for a text-mode bell that will work 
<DIV></DIV>&gt;in windows (i.e. not in curses or Tkinter). 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;I am postitive I have seen this beastie somewhere... Any clues? 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;d 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--__--__-- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;_______________________________________________ 
<DIV></DIV>&gt;Tutor maillist - Tutor@python.org 
<DIV></DIV>&gt;http://mail.python.org/mailman/listinfo/tutor 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;End of Tutor Digest 
<DIV></DIV></div><br clear=all><hr>MSN Photos is the easiest way to share and print your photos: <a href='http://g.msn.com/1HM1ENUS/c156??PI=44364'>Click Here</a><br></html>