This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients Julian, berker.peksag, garthy, paul.j3
Date 2013-12-19.05:46:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 ~/mypy/test.txt
    ['', '/home/paul/mypy/test.txt']
    Namespace(file=<open file '/home/paul/mypy/test.txt', mode 'r'...)

I have to quote the argument '~/mypy/' to bypass this expansion.

This is under Linux (bash).  Is Windows or Mac different?

My impression is that `FileType` has been provided as an example of a custom `type`, as opposed to a comprehensive file handler.  But I can't quote a developer on this. is a bug report that worries that 'argparse.FileType opens a file and never closes it'.  There are some comments there about whether it is appropriate to expand on the capabilities of FileType.
Date User Action Args
2013-12-19 05:46:30paul.j3setrecipients: + paul.j3, Julian, berker.peksag, garthy
2013-12-19 05:46:30paul.j3setmessageid: <>
2013-12-19 05:46:30paul.j3linkissue19959 messages
2013-12-19 05:46:29paul.j3create