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: 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 Subject: Re: Downloading a file form a displayed table Date: Tue, 05 Mar 2013 14:04:00 +0000 References: 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: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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 ( "

" ) > 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 > 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