Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'context': 0.05; 'filename': 0.07; 'filenames': 0.07; 'subject:file': 0.07; 'subject:form': 0.07; 'python': 0.09; "'''": 0.09; 'any.': 0.09; 'page?': 0.09; 'specifying': 0.09; 'looked': 0.10; 'server,': 0.15; 'sys.exit(0)': 0.16; 'wrote:': 0.17; 'code.': 0.20; 'displayed': 0.22; 'skip:= 20': 0.22; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'table,': 0.29; "skip:' 10": 0.30; 'button': 0.30; 'code': 0.31; 'file': 0.32; 'running': 0.32; 'print': 0.32; 'to:addr:python-list': 0.33; 'version': 0.34; 'wrong': 0.34; 'server': 0.35; 'path': 0.35; 'table': 0.35; 'but': 0.36; 'closing': 0.36; 'useful': 0.36; 'anything': 0.36; 'display': 0.36; 'subject:: ': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'skip:" 10': 0.40; 'received:192.168': 0.40; 'your': 0.60; 'show': 0.63; 'dont': 0.64; 'received:74.208': 0.71; 'click': 0.76; 'brand': 0.78; 'browser.': 0.81; 'presumably': 0.84; 'fragment': 0.91 Date: Tue, 05 Mar 2013 04:45:09 -0500 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Downloading a file form a displayed table References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:Fl5LBxxXfwH8jLfy2buNtYunEzV72JpdyQ5v0/EWxV6 YOdkPphaSKPIFOzm27reLSi81WZXYJeYoWtxkmva4CXS4qKejD iDP+3B39A6UulOLkUsM5bDQ9U4JUfuQBK/pZU41X1prkVNJ2M+ 1DzWO7aqg1Dxd59t+SUj8Mx2xaVoSpx972ApFkMawkEU6FfoqY DCWhfqPDotDRQijfPydY5eySWNwpDEOQjn5ikfFk/UOZKGdqEl DW0MPAu88DlVlDnbx6AgQnfkazvBkJBzGUBA6sgWvY4/HUN/Ax zF+wFN+PZdlS3tV/e7DQ8tq5XjNPaxQiOz3IPej4gj2t55S1w= = X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362476722 news.xs4all.nl 6881 [2001:888:2000:d::a6]:41908 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40510 On 03/05/2013 04:00 AM, Νίκος Γκρ33κ wrote: > # ================================================================================================================= > # display download button for each file and downlaod it on click > # ================================================================================================================= > if form.getvalue('show') == 'files': > > print ( "

" ) > print ( "" ) > > path = "/data/files/" > > for filename in os.walk(path): > print ''' > > print( "" ) % filename > > ''' > > 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 > It would be useful to actually specifying the context of this fragment of code. Presumably it's running on a web server somewhere, and you're expecting the filenames to somehow show up on a browser. Which OS and which version of Python for that server, and what brand and version of browser? Have you considered closing the table, and ending the body of the page? Have you looked at the result with View->Source in your browser? -- DaveA