Q:

Unknown python expression filename=r'/path/to/file'

I found this potentially very useful python script, but came across these expressions which I've never seen before:
inputfilename = r'/path/to/infile'
outputfilename = r'/path/to/outfile'

I can't find a way to search for it. what does the r'...' do?
Thanks for your help!

A:

The r'..' string modifier causes the '..' string to be interpreted literally. That means, r'My\Path\Without\Escaping' will evaluate to 'My\Path\Without\Escaping' - without causing the backslash to escape characters. The prior is equivalent to 'My\\Path\\Without\\Escaping' string, but without the raw modifier.
Note: The string cannot end with an odd number of backslashes, i.e r'Bad\String\Example\' is not a correct string.

A:

It's called raw string literal.
According to Python String literals documentation:

The backslash (\) character is used to escape characters that
  otherwise have a special meaning, such as newline, backslash itself,
  or the quote character. String literals may optionally be prefixed
  with a letter 'r' or 'R'; such strings are called raw strings and use
  different rules for interpreting backslash escape sequences.
...
Unless an 'r' or 'R' prefix is present, escape sequences in strings
  are interpreted according to rules similar to those used by Standard C

