diff --git a/keyCommandsDoc.py b/keyCommandsDoc.py index 07f3cbcec6c..9b892c15db8 100644 --- a/keyCommandsDoc.py +++ b/keyCommandsDoc.py @@ -213,7 +213,7 @@ def _heading(self, m): self._headings.append(m) self._kcLastHeadingLevel = min(self._kcLastHeadingLevel, level - 1) - RE_SETTING_SINGLE_KEY = re.compile(ur"^[^|]+?[::]\s*(.+?)\s*$") + RE_SETTING_SINGLE_KEY = re.compile(r"^[^|]+?[::]\s*(.+?)\s*$") def _handleSetting(self): if not self._settingsHeaderRow: raise KeyCommandsError("%d, setting command cannot be used before settingsSection command" % self._lineNum) diff --git a/source/characterProcessing.py b/source/characterProcessing.py index d8c830a1b85..011a4c6d8e6 100644 --- a/source/characterProcessing.py +++ b/source/characterProcessing.py @@ -507,7 +507,7 @@ def __init__(self, locale): # Simple symbols. # These are all handled in one named group. # Because the symbols are just text, we know which symbol matched just by looking at the matched text. - patterns.append(ur"(?P{multiChars}|{singleChars})".format( + patterns.append(r"(?P{multiChars}|{singleChars})".format( multiChars="|".join(re.escape(identifier) for identifier in multiChars), singleChars=characters )) diff --git a/source/config/__init__.py b/source/config/__init__.py index c0f2e62c41b..aa374fc2519 100644 --- a/source/config/__init__.py +++ b/source/config/__init__.py @@ -169,7 +169,7 @@ def initConfigPath(configPath=None): if not os.path.isdir(subdir): os.makedirs(subdir) -RUN_REGKEY = ur"SOFTWARE\Microsoft\Windows\CurrentVersion\Run" +RUN_REGKEY = r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run" def getStartAfterLogon(): if (easeOfAccess.isSupported and easeOfAccess.canConfigTerminateOnDesktopSwitch @@ -237,7 +237,7 @@ def execElevated(path, params=None, wait=False,handleAlreadyElevated=False): #: The name of the registry key stored under HKEY_LOCAL_MACHINE where system wide NVDA settings are stored. #: Note that NVDA is a 32-bit application, so on X64 systems, this will evaluate to "SOFTWARE\WOW6432Node\nvda" -NVDA_REGKEY = ur"SOFTWARE\NVDA" +NVDA_REGKEY = r"SOFTWARE\NVDA" def getStartOnLogonScreen(): if easeOfAccess.isSupported and easeOfAccess.willAutoStart(winreg.HKEY_LOCAL_MACHINE): diff --git a/source/mathPres/mathPlayer.py b/source/mathPres/mathPlayer.py index e21627a4dd8..7b297f0520a 100644 --- a/source/mathPres/mathPlayer.py +++ b/source/mathPres/mathPlayer.py @@ -21,9 +21,9 @@ # Break. r" ?" # Pronunciation of characters. - ur"|(?P[^<]) ?" + r"|(?P[^<]) ?" # Specific pronunciation. - ur"| (?P[^ <]+) ?" + r"| (?P[^ <]+) ?" # Prosody. r"| ?" r"|(?P) ?" diff --git a/source/virtualBuffers/__init__.py b/source/virtualBuffers/__init__.py index 7957916ef3b..343e415a367 100644 --- a/source/virtualBuffers/__init__.py +++ b/source/virtualBuffers/__init__.py @@ -50,8 +50,8 @@ class VBufStorage_findMatch_word(unicode): FINDBYATTRIBS_ESCAPE_TABLE = { # Symbols that are escaped in the attributes string. - ord(u":"): ur"\\:", - ord(u";"): ur"\\;", + ord(u":"): r"\\:", + ord(u";"): r"\\;", ord(u"\\"): u"\\\\\\\\", } # Symbols that must be escaped for a regular expression.