Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: netrc and password containing whitespace Date: Thu, 24 Mar 2016 10:33:01 -0400 Lines: 21 Message-ID: References: <87wposnpx4.fsf@metapensiero.it> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de CY62zWIZS1VRXrssEgEiAQTwboKcECYikn3iwd7HWsSw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:password': 0.05; '"my': 0.09; 'lookup': 0.09; 'received:internal': 0.09; 'thu,': 0.15; '24,': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'one)': 0.16; 'quoted': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'library': 0.20; 'machine': 0.21; 'parse': 0.22; 'trying': 0.22; 'seems': 0.23; 'insert': 0.23; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'entries': 0.27; 'idea': 0.28; "i'm": 0.30; 'that.': 0.30; 'mention': 0.30; 'entry': 0.31; 'though,': 0.32; 'raising': 0.33; 'surprised': 0.33; 'definition': 0.34; 'file': 0.34; 'handle': 0.34; 'trouble': 0.35; 'something': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'missing': 0.37; 'seem': 0.37; '(with': 0.38; 'received:66': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'called': 0.40; 'your': 0.60; 'header :Message-Id:1': 0.61; 'programs': 0.62; 'skip:n 10': 0.62; 'mar': 0.65; 'account': 0.66; 'prompt': 0.79 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=ULxNjzAkaVWaEUUPW6YQBDkXjyg=; b=kwEO3B hs6WUaFkzDK/9P+5su7CDQSL5RHYrVgXWiT4CfdF17b9CXoO95jRRFViz9T28cu4 XMEqC3V0Twt0sH3oHcScLeuvdfa3n+V94xfw9Bvsx/I2OQn4zKiLFe++zU9z9ymk JeOm6tqaMHX5zUsI0ESU8vWudiikSstL3rpSw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ULxNjzAkaVWaEUU PW6YQBDkXjyg=; b=R8ZexhDci7CHdLMRpaZZ5XIZeXZVLlok91b2M41tuMvPHqJ w2w2GdeGiOUyumfTr0Djad9k2qiqXa5E0sbZNcED3WkgoTKJmCH6MyIzlV3VtPqx AhLTcYEnV+Rnlhu7E7sYLR1cgulLHfMNywHYo1D+N5M5RWEz04fwNcteMmrI= X-Sasl-Enc: DEn/dxH/dRI/dqHRIYMiQub1182z+110TKkdmt8s/UG9 1458829981 X-Mailer: MessagingEngine.com Webmail Interface - ajax-eaa4717d In-Reply-To: <87wposnpx4.fsf@metapensiero.it> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105618 On Thu, Mar 24, 2016, at 06:14, Lele Gaifax wrote: > I tried to insert an entry in my ~/.netrc for an account having a > password that contains a space, something like: > > machine my-host-name login myname password "My Password" > > The standard library netrc module does not seem able to parse it, > raising a NetrcParseError. Other programs (Emacs, to mention one) do > the right thing with an entry like that. > > I was not able to lookup an exact definition of netrc's syntax, so I > wonder: is the implementation somewhat flawed, or am I missing > something? The implementation seems very basic... I ran into trouble trying to store entries with no password (with the idea in mind of having my program prompt for the password), though, out of curiosity, does ftp handle your quoted passwords? Also, I'm surprised that you're using .netrc for emacs - in my experience the file emacs uses is called .authinfo.