Message169958
| Author |
ZhuangZi |
| Recipients |
ZhuangZi, bethard |
| Date |
2012年09月07日.00:04:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1346976291.75.0.854427077128.issue15874@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
When using the argparse argument fromfile_prefix_chars to obtain command line arguments from a file, it is not possible to make use of bash environment variables within this file.
Ideally one would be able to `export BAR='/Users/x/Desktop/bar'`, and then give arguments such as:
--foo
$BAR
and have this correctly expanded at read time to --foo '/Users/x/Desktop/bar'.
To my knowledge, this is currently only possible if you give the arguments directly via the command line:
python test.py --foo $BAR
It would be great to be able to use environment variables within files as well! |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月07日 00:04:53 | ZhuangZi | set | recipients:
+ ZhuangZi, bethard |
| 2012年09月07日 00:04:51 | ZhuangZi | set | messageid: <1346976291.75.0.854427077128.issue15874@psf.upfronthosting.co.za> |
| 2012年09月07日 00:04:50 | ZhuangZi | link | issue15874 messages |
| 2012年09月07日 00:04:49 | ZhuangZi | create |
|