Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40653

Re: sync databse table based on current directory data without losign previous values

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <nagia.retsina@gmail.com>
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; 'output': 0.04; 'filename': 0.07; 'filenames': 0.07; 'expectation': 0.09; 'inserted': 0.09; 'iterate': 0.09; 'lawrence': 0.09; 'to:addr:comp.lang.python': 0.09; 'tuple': 0.09; 'cc:addr:python-list': 0.10; 'stored': 0.10; 'files.': 0.13; 'ignore': 0.13; 'dirnames,': 0.16; 'dirpath,': 0.16; 'idle.': 0.16; 'losing': 0.16; 'michael,': 0.16; 'os.walk': 0.16; 'sec': 0.16; 'subject: \n ': 0.16; 'subject:based': 0.16; 'subject:values': 0.16; 'troll': 0.16; 'tuple,': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'changes': 0.20; 'skip:" 30': 0.20; 'trying': 0.21; 'cc:2**0': 0.23; 'insert': 0.23; 'this:': 0.23; 'cc:no real name:2**0': 0.24; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '+0100,': 0.29; 'questions.': 0.29; 'thinks': 0.29; "skip:' 10": 0.30; 'that.': 0.30; 'folder': 0.30; 'waste': 0.30; 'subject:data': 0.33; 'guys': 0.33; 'received:google.com': 0.34; 'self': 0.34; 'path': 0.35; 'so,': 0.35; 'sometimes': 0.35; 'received:209.85': 0.35; 'michael': 0.36; 'but': 0.36; 'thank': 0.36; 'display': 0.36; 'supporting': 0.37; 'why': 0.37; 'item': 0.37; 'previous': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'files': 0.38; 'fact': 0.38; 'some': 0.38; 'instead': 0.39; 'notice': 0.39; 'think': 0.40; 'from:no real name:2**0': 0.60; 'containing': 0.61; 'world': 0.63; 'skip:= 30': 0.64; 'here': 0.65; 'our': 0.65; 'records': 0.68; '8bit%:100': 0.70; '8bit%:92': 0.70; '2013': 0.84; 'refusing': 0.84; 'suits': 0.84
X-Received by 10.49.12.130 with SMTP id y2mr2961175qeb.31.1362586163532; Wed, 06 Mar 2013 08:09:23 -0800 (PST)
Newsgroups comp.lang.python
Date Wed, 6 Mar 2013 08:09:23 -0800 (PST)
In-Reply-To <mailman.2947.1362578676.2939.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=94.68.127.128; posting-account=hGu1uQoAAACZy7LiR653nG0NwqDrTyoS
References <390f0dc5-5750-4849-9433-a19d90cc8566@googlegroups.com> <kh7ajh$jlc$1@ger.gmane.org> <mailman.2947.1362578676.2939.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 94.68.127.128
MIME-Version 1.0
Subject Re: sync databse table based on current directory data without losign previous values
From nagia.retsina@gmail.com
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
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>
Message-ID <mailman.2954.1362592425.2939.python-list@python.org> (permalink)
Lines 102
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1362592425 news.xs4all.nl 6877 [2001:888:2000:d::a6]:37664
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:40653

Show key headers only | View raw


Τη Τετάρτη, 6 Μαρτίου 2013 4:04:26 μ.μ. UTC+2, ο χρήστης Michael Ross έγραψε:
> On Wed, 06 Mar 2013 12:52:00 +0100, Mark Lawrence  
> 
> <breamoreboy@yahoo.co.uk> wrote:
> 
> 
> 
> > On 06/03/2013 07:45, Νίκος Γκρ33κ wrote:
> 
> >> I'am using this snipper to read a current directory and insert all  
> 
> >> filenames into a databse and then display them.
> 
> >>
> 
> >> But what happens when files are get removed form the directory?
> 
> >> The inserted records into databse remain.
> 
> >> How can i update  the databse to only contain the existing filenames  
> 
> >> without losing the previous stored data?
> 
> >>
> 
> >> Here is what i ahve so far:
> 
> >>
> 
> >> ==================================
> 
> >> path = "/home/nikos/public_html/data/files/"
> 
> >>
> 
> >> #read the containing folder and insert new filenames
> 
> >> for result in os.walk(path):
> 
> >
> 
> > You were told yesterday at least twice that os.walk returns a tuple but  
> 
> > you still insist on refusing to take any notice of our replies when it  
> 
> > suits you, preferring instead to waste everbody's time with these  
> 
> > questions.  Or are you trying to get into the Guinness Book of World  
> 
> > Records for the laziest bastard on the planet?
> 
> 
> 
> Hold on a sec ...
> 
> 
> 
> He has
> 
> 
> 
> for result in os.walk(path):
> 
> 	for filename in result[2]:
> 
> 
> 
> So he *did* take notice of that.
> 
> 
> 
> 
> 
> Nikos:
> 
> Expectation is to iterate through a tuple like this:
> 
> 
> 
> for dirpath, dirnames, filenames in os.walk(path):
> 
> 	...

Thank you Michael, yes i ahve understood that myself yesterday after one of the guys here have shown the output of os.walk(path) in IDLE. 
So, yes in fact i was in need for the 3rd item in the tuple, so to get hold on to the files.

Thank you for supporting me, some ppl here think i'am a troll and don't try thinks or ignore evrything but 'some_ppl's_opinion != True'

I'am just sometimes persistant on having thing my way that why i was calling my self Ferrous cRanus, which i changes it since it was annoying....

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

sync databse table based on current directory data without losign previous values Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 23:45 -0800
  Re: sync databse table based on current directory data without losign previous values Lele Gaifax <lele@metapensiero.it> - 2013-03-06 09:19 +0100
    Re: sync databse table based on current directory data without losign previous values Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 00:57 -0800
      Re: sync databse table based on current directory data without losign previous values Lele Gaifax <lele@metapensiero.it> - 2013-03-06 10:24 +0100
        Re: sync databse table based on current directory data without losign previous values Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 01:41 -0800
          Re: sync databse table based on current directory data without losign previous values Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 01:43 -0800
            Re: sync databse table based on current directory data without losign previous values Bryan Devaney <bryan.devaney@gmail.com> - 2013-03-06 02:15 -0800
            Re: sync databse table based on current directory data without losign previous values Bryan Devaney <bryan.devaney@gmail.com> - 2013-03-06 02:15 -0800
          Re: sync databse table based on current directory data without losign previous values Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 01:43 -0800
          Re: sync databse table based on current directory data without losign previous values Lele Gaifax <lele@metapensiero.it> - 2013-03-06 11:27 +0100
          Re: sync databse table based on current directory data without losign previous values Dave Angel <davea@davea.name> - 2013-03-06 08:31 -0500
          Re: sync databse table based on current directory data without losign previous values Lele Gaifax <lele@metapensiero.it> - 2013-03-06 15:16 +0100
        Re: sync databse table based on current directory data without losign previous values Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 01:41 -0800
    Re: sync databse table based on current directory data without losign previous values Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 00:57 -0800
  Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Wong Wah Meng-R32813 <r32813@freescale.com> - 2013-03-06 10:11 +0000
    Re: Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Bryan Devaney <bryan.devaney@gmail.com> - 2013-03-06 02:25 -0800
      RE: Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Wong Wah Meng-R32813 <r32813@freescale.com> - 2013-03-06 12:31 +0000
      Re: Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Dave Angel <davea@davea.name> - 2013-03-06 08:18 -0500
      Re: Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Dave Angel <davea@davea.name> - 2013-03-06 08:25 -0500
    Re: Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Bryan Devaney <bryan.devaney@gmail.com> - 2013-03-06 02:25 -0800
    Re: Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-06 23:34 +0000
      RE: Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Wong Wah Meng-R32813 <r32813@freescale.com> - 2013-03-07 06:33 +0000
      Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Chris Angelico <rosuav@gmail.com> - 2013-03-07 18:19 +1100
      RE: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Wong Wah Meng-R32813 <r32813@freescale.com> - 2013-03-08 09:08 +0000
      Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-03-08 19:40 -0500
      RE: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Wong Wah Meng-R32813 <r32813@freescale.com> - 2013-03-09 08:07 +0000
        Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Grant Edwards <invalid@invalid.invalid> - 2013-03-09 19:18 +0000
          Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Roy Smith <roy@panix.com> - 2013-03-09 15:04 -0500
            Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Grant Edwards <invalid@invalid.invalid> - 2013-03-09 20:35 +0000
              Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Roy Smith <roy@panix.com> - 2013-03-09 16:44 -0500
                Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Grant Edwards <invalid@invalid.invalid> - 2013-03-11 14:27 +0000
      Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Dave Angel <davea@davea.name> - 2013-03-09 06:02 -0500
      Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Isaac To <isaac.to@gmail.com> - 2013-03-09 23:02 +0800
  Re: Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Terry Reedy <tjreedy@udel.edu> - 2013-03-06 05:59 -0500
  Re: sync databse table based on current directory data without losign previous values Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-03-06 11:52 +0000
  RE: Set x to  to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Wong Wah Meng-R32813 <r32813@freescale.com> - 2013-03-06 12:36 +0000
  Re: sync databse table based on current directory data without losign previous values Chris Angelico <rosuav@gmail.com> - 2013-03-07 00:40 +1100
  Re: sync databse table based on current directory data without losign previous values "Michael Ross" <gmx@ross.cx> - 2013-03-06 15:04 +0100
    Re: sync databse table based on current directory data without losign previous values nagia.retsina@gmail.com - 2013-03-06 08:09 -0800
    Re: sync databse table based on current directory data without losign previous values nagia.retsina@gmail.com - 2013-03-06 08:09 -0800

csiph-web