Re: [Tutor] How do I delete all Files of certain extension type?

2007-06-20 Thread F.Lee
remove takes a path as its parm, not a list. suggestion: How 'bout something like for f in pb_files: os.remove(f) In fact, since you're removing all of 'em, you could just do os.system("rm *.pb") ## assumes *nix OS HTH F.Lee ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Repeating an action

2007-05-12 Thread F.Lee
On 5/12/07, Alan Gilfoy <[EMAIL PROTECTED]> wrote: > How do you 'tell' Python to repeat a certain action X amount of times, > and then stop. > > I could use a 'counter' (see below), but that seems kind of clunky. > > > > counter = 0 > example = True > while example: > > print "Do something" >