[issue21301] pathlib missing Path.expandvars(env=os.environ)

2017-04-13 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2017-03-26 Thread Alain Mellan

Alain Mellan added the comment:

Yes, you can close it.

— alain.

On Mar 25, 2017, at 23:51 , Serhiy Storchaka  wrote:

http://bugs.python.org/issue21301 

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2017-03-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

expanduser() is path handling function, but not expandvars(). expandvars() is 
defined in posixpath and ntpath because different OSes use different syntax for 
interpolated strings, and we sometimes need to use a foreign syntax. It doesn't 
have any special relations to paths, it handles them just as strings. Actually 
expandvars() functions are the fifth and the sixth ways of string formatting in 
Python.

I suggest to close this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-11-10 Thread Wolfgang Langner

Wolfgang Langner added the comment:

expandvars(), and expanduser() is part of os.path.

Boot functions are needed for path objects and very useful.
And yes it is a simple string substitution but very common.

--
nosy: +tds333

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

expandvars() works with string, not with path, and I don't think there is a 
place for it in pathlib.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-05-14 Thread Berker Peksag

Berker Peksag added the comment:

Here's a patch to implement expandvars() for PurePath (with tests and 
documentation update).

--
keywords: +patch
nosy: +berker.peksag
stage:  -> patch review
Added file: http://bugs.python.org/file35252/issue21301.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-04-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +pitrou
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-04-18 Thread Alain Mellan

New submission from Alain Mellan:

A lot of times paths are manipulated with environment variables that may even 
be expanded multiple times in a loop. For example, I have a path defined as 
"$RUNDIR/logfile.txt" and expanding the path for a bunch of different RUNDIRs 
in a loop.

By default, it should take os.environ and optionally a different dictionary.

Just like os.path.expandvars(), it should expand $VAR, ${VAR} and %VAR%

--
components: Library (Lib)
messages: 216796
nosy: Alain.Mellan
priority: normal
severity: normal
status: open
title: pathlib missing Path.expandvars(env=os.environ)
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com