How do I pass and string argument with spaces? #3798
Replies: 3 comments 1 reply
|
Hello @marcelonyc! I hope that this helps! |
|
To followup on @northern-64bit answer, note that Regarding spaces you can do the following: |
|
If you want to keep using argparse while supporting date‑time strings with spaces and avoid breaking other arguments, you essentially have three levers to control: |
Uh oh!
There was an error while loading. Please reload this page.
I need to pass a Date Time argument to a command. The Date time has spaces in the string. How do I handle string arguments that have spaces? (I tried single and double quotes)
I did not find a datetime validation so I create one in helper_funcs.py.
When I test my command, the validate_datetime function the parser does not take the full string.
All reactions