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


Groups > comp.lang.python > #105618

Re: netrc and password containing whitespace

From Random832 <random832@fastmail.com>
Newsgroups comp.lang.python
Subject Re: netrc and password containing whitespace
Date 2016-03-24 10:33 -0400
Message-ID <mailman.96.1458829984.2244.python-list@python.org> (permalink)
References <87wposnpx4.fsf@metapensiero.it>

Show all headers | View raw


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.

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


Thread

Re: netrc and password containing whitespace Random832 <random832@fastmail.com> - 2016-03-24 10:33 -0400

csiph-web