diff --git a/Pythonwin/pywin/framework/scriptutils.py b/Pythonwin/pywin/framework/scriptutils.py index 270ac60d65..8161dcb37f 100644 --- a/Pythonwin/pywin/framework/scriptutils.py +++ b/Pythonwin/pywin/framework/scriptutils.py @@ -101,8 +101,8 @@ def IsOnPythonPath(path): def GetPackageModuleName(fileName): """Given a filename, return (module name, new path). - eg - given "c:\a\b\\c\\my.py", return ("b.c.my",None) if "c:\a" is on sys.path. - If no package found, will return ("my", "c:\a\b\\c") + eg - given "c:\\a\\b\\c\\my.py", return ("b.c.my",None) if "c:\\a" is on sys.path. + If no package found, will return ("my", "c:\\a\\b\\c") """ path, fname = os.path.split(fileName) path = origPath = win32ui.FullPath(path) diff --git a/com/win32com/client/__init__.py b/com/win32com/client/__init__.py index 6e23e70540..fef3a5d62c 100644 --- a/com/win32com/client/__init__.py +++ b/com/win32com/client/__init__.py @@ -61,7 +61,7 @@ def GetObject(Pathname=None, Class=None, clsctx=None): ob = GetObject(Class = "ProgID") or GetObject(Class = clsid) will connect to an already running instance of the COM object. - ob = GetObject(r"c:\blah\blah\foo.xls") (aka the COM moniker syntax) + ob = GetObject(r"c:\\blah\\blah\\foo.xls") (aka the COM moniker syntax) will return a ready to use Python wrapping of the required COM object. Note: You must specifiy one or the other of these arguments. I know diff --git a/com/win32comext/authorization/demos/EditServiceSecurity.py b/com/win32comext/authorization/demos/EditServiceSecurity.py index 7f6233e310..ec7891265e 100644 --- a/com/win32comext/authorization/demos/EditServiceSecurity.py +++ b/com/win32comext/authorization/demos/EditServiceSecurity.py @@ -1,7 +1,7 @@ """ Implements a permissions editor for services. Service can be specified as plain name for local machine, -or as a remote service of the form \\machinename\\service +or as a remote service of the form \\\\machinename\\service """ import os diff --git a/isapi/samples/redirector_with_filter.py b/isapi/samples/redirector_with_filter.py index a63b1db13a..a1eced0a85 100644 --- a/isapi/samples/redirector_with_filter.py +++ b/isapi/samples/redirector_with_filter.py @@ -123,7 +123,7 @@ def HttpFilterProc(self, fc): # ~ p = urlmap.PhysicalPath # ~ pos = p.index("\\UC\\") # ~ p = p[:pos] + p[pos+3:] - # ~ p = r"E:\src\pyisapi\webroot\PyTest\formTest.htm" + # ~ p = "E:\\src\\pyisapi\\webroot\\PyTest\\formTest.htm" # ~ print "New path is", p # ~ urlmap.PhysicalPath = p diff --git a/setup.py b/setup.py index ecaa7a692b..206bc89c5a 100644 --- a/setup.py +++ b/setup.py @@ -213,7 +213,7 @@ def finalize_options(self, build_ext): found_mfc = False for incl in os.environ.get("INCLUDE", "").split(os.pathsep): # first is a "standard" MSVC install, second is the Vista SDK. - for candidate in (r"..\src\occimpl.h", r"..\..\src\mfc\occimpl.h"): + for candidate in ("..\\src\\occimpl.h", "..\\..\\src\\mfc\\occimpl.h"): check = os.path.join(incl, candidate) if os.path.isfile(check): self.extra_compile_args.append( @@ -543,7 +543,7 @@ def _check_vc(self): # so find and add them if vcbase and not atlmfc_found: atls_lib = glob.glob( - vcbase + r"ATLMFC\lib\{}\atls.lib".format(self.plat_dir) + vcbase + r"ATLMFC\\lib\{}\\atls.lib".format(self.plat_dir) ) if atls_lib: self.library_dirs.append(os.path.dirname(atls_lib[0])) diff --git a/win32/Demos/FileSecurityTest.py b/win32/Demos/FileSecurityTest.py index 3b8940b644..5a70c3e793 100644 --- a/win32/Demos/FileSecurityTest.py +++ b/win32/Demos/FileSecurityTest.py @@ -8,8 +8,8 @@ import winerror # get security information -# name=r"c:\autoexec.bat" -# name= r"g:\!workgrp\lim" +# name = "c:\\autoexec.bat" +# name = "g:\\!workgrp\\lim" name = sys.argv[0] if not os.path.exists(name): diff --git a/win32/test/test_win32api.py b/win32/test/test_win32api.py index 81b2fe5ef9..7aebb7f7cc 100644 --- a/win32/test/test_win32api.py +++ b/win32/test/test_win32api.py @@ -77,7 +77,7 @@ def reg_operation(): pass def testValues(self): - key_name = r"PythonTestHarness\win32api" + key_name = "PythonTestHarness\\win32api" ## tuples containing value name, value type, data values = ( (None, win32con.REG_SZ, "This is default unnamed value"),