Τη Τρίτη, 5 Μαρτίου 2013 11:51:41 π.μ. UTC+2, ο χρήστης Dave Angel έγραψε: > On 03/05/2013 04:00 AM, Νίκος Γκρ33κ wrote: > > > > > > <snip> > > > > > for filename in os.walk(path): > > > > But os.walk() doesn't return a filename. It returns a tuple. Have you > > tested any of this code outside of a server? > > > > Also, you're using tabs here. They don't show up in most email > > programs, so you're better off replacing them with an appropriate number > > of spaces. After all, indentation matters. > > > > > > > print ''' > > > <form method="get" action="%s"> > > > print( "<tr><td><center> <button type='submit'> %s > > </button> </td></tr>" ) % filename > > > </form> > > > ''' > > > > > > sys.exit(0) > > > > > -- > > DaveA
How is this lien supposed to be written do to iterate over a list of filenames? for filename in list( os.walk(path) ): i tried the above but still it doesn't work out. -- http://mail.python.org/mailman/listinfo/python-list