sertit.strings.to_cmd_string¶
- to_cmd_string(unquoted_str: str) str [source]¶
Add quotes around the string in order to make the command understand it’s a string (useful with tricky symbols like & or white spaces):
>>> # This str wont work in the terminal without quotes (because of the &) >>> pb_str = r"D:\Minab_4-DA&VHR\Minab_4-DA&VHR.shp" >>> to_cmd_string(pb_str) ""D:\Minab_4-DA&VHR\Minab_4-DA&VHR.shp""