Message127855
Thanks for the new patch. It does not apply cleanly to the py3k branch, but that’s very easily corrected.
self.file.write(self.message)
self.file.write('\n')
Could be replaced by
print(self.message, file=self.file)
print will use the right EOL for the platform and is just coooler.
By the way, self.file should not be rebound in __call__:
if self.file is None:
self.file = _sys.stdout
→
file = (self.file if self.file is not None else _sys.stdout)
> Second, there are cases where you want whitespaces to be preserved,
> like printing out the license of your program (as I mentioned in my
> first post) Just look at this BSD license: [...]
> This is just plain ugly.
Agreed, but I did not suggest that the output be like that. In my previous message, I suggested that argparse could replace \n with spaces and do its own line wrapping, to adapt to terminal length while avoiding chunking ugliness. That’s Steven’s call anyway, I don’t have any strong feeling in favor of preserving whitespace or rewrapping. If argparse wraps lines to the terminal width in other cases (like with epilog text), I think it should do so here too. |
|
Date |
User |
Action |
Args |
2011-02-04 01:47:13 | eric.araujo | set | recipients:
+ eric.araujo, georg.brandl, bethard, travistouchdown |
2011-02-04 01:47:13 | eric.araujo | set | messageid: <1296784033.87.0.914652059317.issue9399@psf.upfronthosting.co.za> |
2011-02-04 01:47:13 | eric.araujo | link | issue9399 messages |
2011-02-04 01:47:12 | eric.araujo | create | |
|