Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:password': 0.05; 'detect': 0.07; 'differently': 0.07; 'means,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'determines': 0.16; 'finney': 0.16; 'password,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sudo': 0.16; 'command': 0.22; 'header:User-Agent:1': 0.23; 'instance,': 0.24; 'passes': 0.24; 'second': 0.26; 'header:X -Complaints-To:1': 0.27; 'tim': 0.29; "doesn't": 0.30; 'code': 0.31; 'writes:': 0.31; 'subject:with': 0.35; 'ben': 0.38; 'to:addr :python-list': 0.38; 'itself': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'free': 0.61; 'first': 0.61; 'world': 0.66; 'believe': 0.68; 'subjectcharset:utf-8': 0.72; 'other.': 0.75; 'forth': 0.81; 'crush': 0.84; 'received:125': 0.84; 'subject:Using': 0.84; 'tolerance': 0.84; '\xe2\x80\x9cwe': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Using a password with =?utf-8?B?4oCYc3Vkb+KAmQ==?= (was: Quotation Ugliness) Date: Wed, 26 Nov 2014 18:02:02 +1100 References: <54756D5F.4040806@tundraware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:HdQs8b1TMz5+nsvUK0FDJcc7z4M= 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416985333 news.xs4all.nl 2847 [2001:888:2000:d::a6]:44683 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81550 Tim Daneliuk writes: > Here's a usecase - I want to know whether I need to use a sudo > password when the user passes a command on the command line of a > program: […] > In the first instance, I need the sudo passoword, in the second I don't. I don't understand what “need a sudo password” means, or what you would do differently if you detect one case or the other. It's the ‘sudo’ command itself that determines whether you need a password, so what is your Python code going to do differently? -- \ “We have to go forth and crush every world view that doesn't | `\ believe in tolerance and free speech.” —David Brin | _o__) | Ben Finney