Hi,
When I try to pass a string with some spaces into the text method and display all the spaces trimmed to one, for example:
text = ' Hello World!'
print(text)
' Hello World!'
But:
self.d.mixedform(text, self.elements, self.height, self.width)
' Hello World!'
There is a way to keep the spaces?
Cheers
Also here all my spaces from the post are gone, so:
'_' = space
text = '_ Hello World!'
print(text)
' ___Hello World!'
But:
self.d.mixedform(text, self.elements, self.height, self.width)
'_Hello World!'
There is a way to keep the spaces?
Hi,
This is due to a feature of the
dialog
program. Please always check its man page before reporting bugs:You can pass this option either globally via
Dialog.add_persistent_args()
or locally usingno_collapse=True
:Also, a self-contained minimal example that shows the problem (like this one without the
"--no-collapse"
norno_collapse=True
since you didn't know about them) would have saved me some time. :-)Regards
Thanks, @frougon this works fine now!