Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40528
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'filename': 0.07; 'filenames': 0.07; 'subject:file': 0.07; 'subject:form': 0.07; "'''": 0.09; 'any.': 0.09; 'happens.': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '09:00,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sys.exit(0)': 0.16; 'wrote:': 0.17; 'trying': 0.21; 'displayed': 0.22; 'skip:= 20': 0.22; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; "skip:' 10": 0.30; 'button': 0.30; 'expect': 0.31; 'code': 0.31; 'file': 0.32; 'from:addr:yahoo.co.uk': 0.32; 'print': 0.32; 'to:addr:python-list': 0.33; 'wrong': 0.34; 'path': 0.35; 'doing': 0.35; 'table': 0.35; 'received:org': 0.36; 'but': 0.36; 'anything': 0.36; 'display': 0.36; 'two': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'files': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'notice': 0.39; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'you.': 0.61; 'dont': 0.64; 'six': 0.65; 'taking': 0.65; 'click': 0.76 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
| Subject | Re: Downloading a file form a displayed table |
| Date | Tue, 05 Mar 2013 14:04:00 +0000 |
| References | <f99ae3d5-6f1f-4dfc-84da-78b758a5147a@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Gmane-NNTP-Posting-Host | host-92-18-29-221.as13285.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 |
| In-Reply-To | <f99ae3d5-6f1f-4dfc-84da-78b758a5147a@googlegroups.com> |
| X-Antivirus | avast! (VPS 130305-0, 05/03/2013), Outbound message |
| X-Antivirus-Status | Clean |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2885.1362492205.2939.python-list@python.org> (permalink) |
| Lines | 42 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1362492205 news.xs4all.nl 6904 [2001:888:2000:d::a6]:40756 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:40528 |
Show key headers only | View raw
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