Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40532

Re: Downloading a file form a displayed table

Newsgroups comp.lang.python
Date 2013-03-05 02:24 -0800
References <f99ae3d5-6f1f-4dfc-84da-78b758a5147a@googlegroups.com> <mailman.2875.1362477114.2939.python-list@python.org>
Subject Re: Downloading a file form a displayed table
From Νίκος Γκρ33κ <nikos.gr33k@gmail.com>
Message-ID <mailman.2887.1362494522.2939.python-list@python.org> (permalink)

Show all headers | View raw


Τη Τρίτη, 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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 01:00 -0800
  Re: Downloading a file form a displayed table Dave Angel <davea@davea.name> - 2013-03-05 04:45 -0500
    Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 01:48 -0800
      Re: Downloading a file form a displayed table Dave Angel <davea@davea.name> - 2013-03-05 05:05 -0500
    Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 01:48 -0800
  Re: Downloading a file form a displayed table Dave Angel <davea@davea.name> - 2013-03-05 04:51 -0500
    Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 02:24 -0800
      Re: Downloading a file form a displayed table Lele Gaifax <lele@metapensiero.it> - 2013-03-05 12:29 +0100
    Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 02:24 -0800
  Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 05:01 -0800
    Re: Downloading a file form a displayed table Joel Goldstick <joel.goldstick@gmail.com> - 2013-03-05 08:38 -0500
    Re: Downloading a file form a displayed table "Vytas D." <vytasd2013@gmail.com> - 2013-03-05 13:38 +0000
      Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 06:37 -0800
      Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 06:37 -0800
  Re: Downloading a file form a displayed table Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-03-05 14:04 +0000

csiph-web