07-19-2024 07:39 AM
Is there a way to pass a literal string to a Python function in a way, that Python treats it as a r"" string?
I'm using a function that looks more or less like this:
def changeFileContent(fullPathToFile):
# Do something with file
# Return boolean if function is done
I've tried to pass the file path in TestStand as @"\my\path\to\file.txt" and the backslashes are interpreted as symbols. Is there a way to fix this?
Kind regards.
Dave
07-19-2024 07:43 AM
I navigate this scenario by creating a local/file global variable of type string, using it like a constant. When entering the value into a String variable, the escape characters aren't a problem.