Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!multikabel.net!newsfeed20.multikabel.net!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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'consistency': 0.09; 'subject:script': 0.09; 'python': 0.11; '8:40': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lower-case': 0.16; 'nameerror:': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'code,': 0.22; 'error': 0.23; 'right.': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'rest': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; '(most': 0.33; "i'd": 0.34; "can't": 0.35; 'received:google.com': 0.35; 'thanks': 0.36; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'new': 0.61; 'name': 0.63; 'capital': 0.73; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=VExJfurA9XbWN8d/3zSNaCVMqUnG4gEBnUVMMubvB+4=; b=0YxZ3EbG9oX0tr7a/wTbw0+zvM12j6KWGAaFYW1RX1u/7JvAZKWm6+iQbq+Up4aLnl ABWZJB1i8SJ2gb2q1LcTQXOhDu2KELWPJ0xcc34Mi1OofxjrFGJXyi2G8xTAPLSn//99 GNQT8m0GrB1Q5T49vGx7WFJY8i+GtdVci9zS6UhXlaPLw6QqheGvunydCc1jcC/3olVR TqFqczjWpEdf8Ec/7APLIS6cJYUdtcEvaynQqqtgnJlqtqMrW8nRE6VLPHYcnKWzv/9N TE5tz2Dnl+55PBY3iYBDITKy21Yj6ahJd9ymQ99pLnRmcJx07tC8TLaiLXyeI9B+1xEx kmfQ== MIME-Version: 1.0 X-Received: by 10.58.15.193 with SMTP id z1mr7592560vec.40.1367880716305; Mon, 06 May 2013 15:51:56 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 May 2013 08:51:56 +1000 Subject: Re: python backup script From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367880718 news.xs4all.nl 15949 [2001:888:2000:d::a6]:35197 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44862 On Tue, May 7, 2013 at 8:40 AM, MMZ wrote: > Thanks Chris. you are right. > So I used them directly and removed configParser. The new error is: > > Traceback (most recent call last): > File "./bbk.py", line 11, in ? > for database in os.popen(database_list_command).readlines(): > NameError: name 'database_list_command' is not defined Python names are case-sensitive. If you create it with a capital D, you can't reference it with a lower-case d. For consistency with the rest of your code, I'd advise lowercasing it. ChrisA