How to keep line breaks in docstring to generate doc

Viewed 39

I have yhe following code at the beginning of a script :

#!/usr/bin/env python3  
"""  
NAME: renPhotosFromDir dir(s)..

DESCRIPTION: Rename jpg, jpeg or mov file from the directory using its name followed by a number

AUTEUR :
    CHAUVIERE Jean-Raymond

DATE: 13 Janvier 2019

COPYRIGHT:
     visit http://www.gnu.org/licenses/licenses.html#GPL

"""

If i run

renPhotosFromDir.py --help

I get the following result :

usage: NVrenPhotosFromDir.py [-h] [directories ...]

NAME: renPhotosFromDir dir(s)... DESCRIPTION: Rename jpg, jpeg or mov file from the directory using its name followed by a number AUTEUR : CHAUVIERE Jean-Raymond DATE: 13 Janvier 2019 COPYRIGHT: visit http://www.gnu.org/licenses/licenses.html#GPL

positional arguments:   directories  liste de répertoires

optional arguments:   -h, --help   show this help message and exit

How I can preserve newlines from the docstring ?

0 Answers
Related