Well, I'm using argparse
module but have found that a multiline text as the version information won't be shown well. The result shows that the '\n' will be changed into space ' '.
Example:
import argparse
ver_text = 'This is the\nversion text!'
parser = argparse.ArgumentParser()
parser.add_argument('-v', '--version', action='version', version=ver_text)
$ python test.py -v
Result:
This is the version text!
So this is the problem. I wonder how to handle it. Thanks very much!