argparse has problems with spaces
carlosala opened this issue · comments
Hi!
We are developing an app for ledger and we have troubles with the name. This app has a two words name separated by a whitespace. Ledger devices have no problems with whitespaces in its appName
but ledgerblue
has. Quoting the variable doesn't help at all, this is the output of print(sys.argv)
when introducing that quoted variable:
['/home/carlo/.local/lib/python3.10/site-packages/ledgerblue/loadApp.py', ..., '--appName', '"xx', 'network"', ...]
As you can see, the first quote goes with the first part of the name and the second with the second one. Same happens with single quotes.
I am running Linux.
The idea that I came up with is to make --appName
repeteable and to join all the parts after parsing the arguments, using action="append"
in argparse
, but I kinda tricky.
Any ideas?
Thanks for your help!
The issue was non-related to this repo, sorry for the noise.