I'm making a shell script with the optparse module, jut for fun, so I wanted to print a nice ascii drawing in place of the description.
Turns out that this code:
parser = optparse.OptionParser(
prog='./spill.py',
description=u'''
/ \
vvvvvvv /|__/|
I /O,O |
I /_____ | /|/|
J|/^ ^ ^ \ | /00 | _//|
|^ ^ ^ ^ |W| |/^^\ | /oo |
\m___m__|_| \m_m_| \mm_|
''',
epilog='''
Las cucarachas lograron con exito su plan, echando a los pestilentes sangre caliente de sus cajas de cemento.
Ahora el hombre es una especie errante en el espacio, un vagabundo errante en las estrellas.''')
renders like this:
$ ./bin/spill.py -h
Usage: ./spill.py [options]
/ \ vvvvvvv /|__/|
I /O,O | I /_____ | /|/|
J|/^ ^ ^ \ | /00 | _//| |^ ^ ^ ^ |W| |/^^\ | /oo |
\m___m__|_| \m_m_| \mm_|
Options:
-h, --help show this help message and exit
#.... bla bla bla, etc
I've tried a varying combination of slashes, newlines and espaces without success.
Can you, friend pytonista, help me display Totoro properly?