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 roschi
Recipients roschi
Date 2017-05-21.08:15:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495354542.35.0.729762114821.issue30421@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,

When one includes an argument file at the command line using argparse and that file contains another include statement, the inner include path is treated as relative to os.getcwd(), what is not the way people expect it to be, I guess.

This patch modifies argparse so that it treats paths of files to include as relative to the location of the file the include was made from.

I also pulled statements that I think should not be enclosed by the try/except out of it and changed the workflow so that the file descriptor of an include file is closed before another one is opened by the recursive call to _read_args_from_files again.. That way, the number of file descriptors open at a time is kept low.

Best regards
Robert
History
Date User Action Args
2017-05-21 08:15:42roschisetrecipients: + roschi
2017-05-21 08:15:42roschisetmessageid: <1495354542.35.0.729762114821.issue30421@psf.upfronthosting.co.za>
2017-05-21 08:15:42roschilinkissue30421 messages
2017-05-21 08:15:42roschicreate