[issue19959] argparse.FileType does not expand tilde "~"

2016-04-02 Thread Martin Panter
Martin Panter added the comment: I’m not super familiar with argparse, but to get a Path or FilePath object, can’t you use that directly instead of argparse’s FileType class? The proposal would conflict with escaping a literal tilde (~) in the shell. It would make it harder for the end user

[issue19959] argparse.FileType does not expand tilde "~"

2016-03-28 Thread Julian Berman
Julian Berman added the comment: My support (or really, asking for a more generic callable) was to enable other use cases, not this one specifically -- e.g., allowing for constructing a pathlib Path or a twisted.python.filepath.FilePath without needing to write one's own argparse action. For

[issue19959] argparse.FileType does not expand tilde "~"

2016-03-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___

[issue19959] argparse.FileType does not expand tilde "~"

2016-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm with Martin. -- nosy: +serhiy.storchaka status: pending -> open ___ Python tracker ___

[issue19959] argparse.FileType does not expand tilde "~"

2016-03-27 Thread Martin Panter
Martin Panter added the comment: I think this change is not appropriate for Unix, because it is redundant and would conflict with normal shell expansion. I’m not familiar with Windows, but I suspect it is not appropriate there either (neither Windows command shells nor argparse do wildcard *

[issue19959] argparse.FileType does not expand tilde ~

2013-12-18 Thread paul j3
paul j3 added the comment: Normally the unix shell takes care of this expansion. If I call a simple script that prints sys.argv and runs a simple parser, I get: 2135:~/mypy$ python2.7 filetypetest.py ~/mypy/test.txt ['filetypetest.py', '/home/paul/mypy/test.txt']

[issue19959] argparse.FileType does not expand tilde ~

2013-12-14 Thread Julian Berman
Julian Berman added the comment: Why not take this a step further and make it take a callable that's expected to take the command line argument and coerce it into a path -- nosy: +Julian ___ Python tracker rep...@bugs.python.org

[issue19959] argparse.FileType does not expand tilde ~

2013-12-12 Thread Garth Bushell
New submission from Garth Bushell: argparse.FileType does not expand tilde ~. This would be useful to take file parameters beginning with ~ and use os.path.expanduser to expand this. -- components: Library (Lib) messages: 205949 nosy: garthy priority: normal severity: normal status:

[issue19959] argparse.FileType does not expand tilde ~

2013-12-12 Thread Garth Bushell
Garth Bushell added the comment: Add patch to add an option to argparse.FileType to enable expanduser. -- keywords: +patch Added file: http://bugs.python.org/file33100/19959-argparse_filetype_expanduser.patch ___ Python tracker

[issue19959] argparse.FileType does not expand tilde ~

2013-12-12 Thread Garth Bushell
Changes by Garth Bushell ga...@garthy.com: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19959 ___ ___ Python-bugs-list

[issue19959] argparse.FileType does not expand tilde ~

2013-12-12 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19959 ___ ___

[issue19959] argparse.FileType does not expand tilde ~

2013-12-12 Thread Garth Bushell
Garth Bushell added the comment: Update patch to include docs. -- Added file: http://bugs.python.org/file33102/19959-argparse_filetype_expanduser_plus_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19959