Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40528
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Subject | Re: Downloading a file form a displayed table |
| Date | 2013-03-05 14:04 +0000 |
| References | <f99ae3d5-6f1f-4dfc-84da-78b758a5147a@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2885.1362492205.2939.python-list@python.org> (permalink) |
On 05/03/2013 09:00, Νίκος Γκρ33κ wrote:
> # =================================================================================================================
> # display download button for each file and downlaod it on click
> # =================================================================================================================
> if form.getvalue('show') == 'files':
>
> print ( "<center><a href='http://superhost.gr/files.html'> <img src='/data/images/download.png'></a><br>" )
> print ( "<table border=5 cellpadding=5 bgcolor=blue>" )
>
> path = "/data/files/"
>
> for filename in os.walk(path):
> print '''
> <form method="get" action="%s">
> print( "<tr><td><center> <button type='submit'> %s </button> </td></tr>" ) % filename
> </form>
> '''
>
> sys.exit(0)
>
> ========================
>
> I use the above code to tidplay a filenames table so the user cna download a displayed button style lookign file but its not printing anything for me just an emptry table
>
> '/data/files' has 5 files in it but its not showing any.
> I dont see what iam doign wrong
>
You're doing at least two things wrong.
1) Not reading documentation
2) Not trying the interactive prompt.
3) Not using the print statement/function.
4) Not taking any notice of what people tell you.
5) Not showing what you expect to happen and what actually happens.
6) You're not doing six wrong.
--
Cheers.
Mark Lawrence
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll 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