Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'root,': 0.07; 'compute': 0.09; 'files:': 0.09; 'received:151': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'dirs,': 0.16; 'emanuele': 0.16; 'files)': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'set()': 0.16; 'subject:based': 0.16; 'subject:values': 0.16; 'typo': 0.16; 'wrongly': 0.16; 'sorry,': 0.22; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; 'writes:': 0.29; "i'm": 0.29; '(and': 0.32; 'subject:data': 0.33; 'to:addr:python- list': 0.33; 'code:': 0.33; 'received:org': 0.36; 'should': 0.36; 'reported': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'quando': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Lele Gaifax Subject: Re: sync databse table based on current directory data without losign previous values Date: Wed, 06 Mar 2013 11:27:30 +0100 Organization: Nautilus Entertainments References: <390f0dc5-5750-4849-9433-a19d90cc8566@googlegroups.com> <3958fc2b-a2fe-4c85-a104-4c6f551cf787@googlegroups.com> <28828019-279a-4d8c-a7ea-ba677b4a8165@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 151.62.64.116 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:+uSoqswGLUU9vGYQ2WPSEWNtK4s= 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362565666 news.xs4all.nl 6880 [2001:888:2000:d::a6]:60611 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40626 Νίκος Γκρ33κ writes: > Its about the following line of code: > > current_fullpaths.add( os.path.join(root, files) ) I'm sorry, typo on my part. That should have been "fullpath", not "file" (and neither "files" as you wrongly reported back!): # Compute a set of current fullpaths current_fullpaths = set() for root, dirs, files in os.walk(path): for fullpath in files: current_fullpaths.add(os.path.join(root, fullpath)) ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.