optparseを使用してコマンドライン引数を処理していますが、optparseヘルプメッセージの複数のスペース行の問題が発生しています。
group.add_option(
'-H',
'--hostname',
action='store',
dest='hostname',
help='Specify the hostname or service/hostname you want to connect to\
If specified -f/--hostfile will be ignored',
metavar='HOSTNAME',)
そのため、ヘルプメッセージの「to」の後にヘルプメッセージにいくつかのスペースが表示されます(インデントのため)。
Specify the hostname or service/hostname you want to connect
to If specified -f/--hostfile will be ignored
ヘルプメッセージの2行目の先頭の空白を削除することはできますが、それは非Pythonです。
ヘルプメッセージの空白を削除するためのPythonの方法はありますか?