Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44856
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.025 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'username,': 0.07; 'feature.': 0.09; 'subject:script': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hostname': 0.16; 'inclined': 0.16; 'notation': 0.16; 'password,': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'shell': 0.22; "aren't": 0.24; 'pass': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'username': 0.31; 'stuff': 0.32; 'used,': 0.33; 'actual': 0.34; 'skip:d 20': 0.34; "i'd": 0.34; 'problem': 0.35; 'received:google.com': 0.35; 'so,': 0.37; 'clear': 0.37; 'to:addr:python-list': 0.38; 'fact': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'break': 0.61; 'worth': 0.66; 'fact,': 0.69; 'directly.': 0.95; '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=nipiGYVahDrhU+f6pydqr2ZzyA0LBuzxx5vtSe1yRjY=; b=WgoJFiGKNL32WMp5dB3IKzj0ipqG6dTUbGCSdZUhLod0UEw9daI5yQaJ+wRDxnxafr YObJxJY9HkIYr/ikIpIwxkbcHQdr8f2cz8jfFdnqWk3ktTxI2aKvihjYPwGBa5vtYqai NTvdwaEBufxJD5ugeJlb4+RTyxgptURnN5MUrHj8AvLtnUV+futZzyvyfMJxytexxS4v Ou+Nz0zDslxD2qArgudTKNbBaeKbMNIRKQbOBCl7P82GinZM4ewLDnogj8of1UNUaLki bx0NgSAb6rWSYayl7xwc2QAKTr9nE9naxCUDbRFx0u0ZLOHhxLoOXgwMvX2ULz4TFeOS 5lUA== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.37.109 with SMTP id x13mr6508701vdj.10.1367878348374; Mon, 06 May 2013 15:12:28 -0700 (PDT) |
| In-Reply-To | <b586db98-78b2-40a6-9e1c-3d8b939657c8@googlegroups.com> |
| References | <b586db98-78b2-40a6-9e1c-3d8b939657c8@googlegroups.com> |
| Date | Tue, 7 May 2013 08:12:28 +1000 |
| Subject | Re: python backup script |
| From | Chris Angelico <rosuav@gmail.com> |
| 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 <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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1388.1367878356.3114.python-list@python.org> (permalink) |
| Lines | 17 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1367878356 news.xs4all.nl 15865 [2001:888:2000:d::a6]:41897 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:44856 |
Show key headers only | View raw
On Tue, May 7, 2013 at 5:01 AM, MMZ <programmer.toronto@gmail.com> wrote:
> username = config.get('client', 'mmz')
> password = config.get('client', 'pass1')
> hostname = config.get('client', 'localhost')
Are 'mmz', 'pass1', and 'localhost' the actual values you want for
username, password, and hostname? If so, don't pass them through
config.get() at all - just use them directly. In fact, I'd be inclined
to just stuff them straight into the Database_list_command literal;
that way, it's clear how they're used, and the fact that you aren't
escaping them in any way isn't going to be a problem (tip: an
apostrophe in your password would currently break your script).
It's also worth noting that the ~/ notation is a shell feature. You
may or may not be able to use it in config.read().
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
python backup script MMZ <programmer.toronto@gmail.com> - 2013-05-06 12:01 -0700
Re: python backup script Jerry Hill <malaclypse2@gmail.com> - 2013-05-06 15:11 -0400
Re: python backup script MMZ <programmer.toronto@gmail.com> - 2013-05-06 12:20 -0700
Re: python backup script Matt Jones <matt.walker.jones@gmail.com> - 2013-05-06 14:46 -0500
Re: python backup script MMZ <programmer.toronto@gmail.com> - 2013-05-06 13:37 -0700
Re: python backup script Matt Jones <matt.walker.jones@gmail.com> - 2013-05-06 16:08 -0500
Re: python backup script Enrico 'Henryx' Bianchi <henryx_b@yahoo.it> - 2013-05-06 23:44 +0200
Re: python backup script Enrico 'Henryx' Bianchi <henryx_b@yahoo.it> - 2013-05-06 23:48 +0200
Re: python backup script mina@socialassets.org - 2013-05-06 15:12 -0700
Re: python backup script John Gordon <gordon@panix.com> - 2013-05-06 22:15 +0000
Re: python backup script Enrico 'Henryx' Bianchi <henryx_b@yahoo.it> - 2013-05-07 21:11 +0200
Re: python backup script MRAB <python@mrabarnett.plus.com> - 2013-05-06 23:28 +0100
Re: python backup script MMZ <programmer.toronto@gmail.com> - 2013-05-06 15:15 -0700
Re: python backup script Chris Angelico <rosuav@gmail.com> - 2013-05-07 08:12 +1000
Re: python backup script MMZ <programmer.toronto@gmail.com> - 2013-05-06 15:40 -0700
Re: python backup script Chris Angelico <rosuav@gmail.com> - 2013-05-07 08:51 +1000
Re: python backup script MRAB <python@mrabarnett.plus.com> - 2013-05-06 23:52 +0100
Re: python backup script Peter Otten <__peter__@web.de> - 2013-05-07 08:18 +0200
csiph-web