mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
Fix bad escape in some docstrings
This commit is contained in:
@@ -31,6 +31,6 @@ def test_remote_handle_type_and_name(proc32_64):
|
||||
remote_handle = [x for x in proc32_64.handles if x.value == file_handle_vlue][0]
|
||||
assert remote_handle.pid == proc32_64.pid
|
||||
assert remote_handle.type == "File"
|
||||
assert remote_handle.name.startswith("\Device\HarddiskVolume")
|
||||
assert remote_handle.name.startswith(r"\Device\HarddiskVolume")
|
||||
assert remote_handle.name.endswith(TEST_FILE_FOR_HANDLE[2:]) # Remove volume letter
|
||||
assert remote_handle.infos
|
||||
@@ -32,7 +32,7 @@ def test_multiple_access_type(objname):
|
||||
|
||||
|
||||
def test_complex_object_path():
|
||||
obj = objmanager["\\KnownDLLs\\kernel32.dll"]
|
||||
obj = objmanager[r"\KnownDLLs\kernel32.dll"]
|
||||
assert obj.name == "kernel32.dll"
|
||||
assert obj.fullname == "\\KnownDLLs\\kernel32.dll"
|
||||
assert obj.path == "\\KnownDLLs"
|
||||
@@ -41,9 +41,9 @@ def test_complex_object_path():
|
||||
|
||||
|
||||
def test_link_object():
|
||||
obj = objmanager["\\KnownDLLs\\KnownDLLPath"]
|
||||
obj = objmanager[r"\KnownDLLs\KnownDLLPath"]
|
||||
assert obj.type == "SymbolicLink"
|
||||
assert obj.target.lower() == "c:\windows\system32"
|
||||
assert obj.target.lower() == r"c:\windows\system32"
|
||||
|
||||
# Test unicode string in Kernel object using an ALPC port
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ DEFAULT_DBG_OPTION = gdef.SYMOPT_DEFERRED_LOADS + gdef.SYMOPT_UNDNAME
|
||||
|
||||
|
||||
def set_dbghelp_path(path):
|
||||
"""Set the path of the ``dbghelp.dll`` file to use. It allow to configure a different version of the DLL handling PDB downloading.
|
||||
r"""Set the path of the ``dbghelp.dll`` file to use. It allow to configure a different version of the DLL handling PDB downloading.
|
||||
|
||||
If ``path`` is a directory, the final ``dbghelp.dll`` will be computed as
|
||||
``path\<current_process_bitness>\dbghelp.dll``.
|
||||
@@ -124,7 +124,7 @@ class SymbolInfoA(gdef.SYMBOL_INFO, SymbolInfoBase):
|
||||
CHAR_TYPE = gdef.CHAR
|
||||
|
||||
class SymbolInfoW(gdef.SYMBOL_INFOW, SymbolInfoBase):
|
||||
"""Represent a Symbol.
|
||||
r"""Represent a Symbol.
|
||||
This class in based on the class `SYMBOL_INFO <https://docs.microsoft.com/en-us/windows/win32/api/dbghelp/ns-dbghelp-symbol_info>`_
|
||||
with the handling on displacement embeded into it.s
|
||||
|
||||
@@ -326,7 +326,7 @@ class SymbolModule(gdef.IMAGEHLP_MODULEW64):
|
||||
|
||||
@property
|
||||
def pdb(self):
|
||||
"""The local path of the loaded PDB if present
|
||||
r"""The local path of the loaded PDB if present
|
||||
|
||||
Exemple:
|
||||
>>> sh = windows.debug.symbols.VirtualSymbolHandler()
|
||||
@@ -455,7 +455,7 @@ class SymbolHandler(object):
|
||||
return sym
|
||||
|
||||
def resolve(self, name_or_addr):
|
||||
"""Resolve ``name_or_addr``.
|
||||
r"""Resolve ``name_or_addr``.
|
||||
|
||||
If its an int -> Return the :class:`SymbolInfo` at the address.
|
||||
If its a string -> Return the :class:`SymbolInfo` corresponding to the symbol name
|
||||
@@ -504,7 +504,7 @@ class SymbolHandler(object):
|
||||
return True
|
||||
|
||||
def search(self, mask, mod=0, tag=0, options=gdef.SYMSEARCH_ALLITEMS, callback=None):
|
||||
"""Search the symbols matching ``mask`` (``Windbg`` like).
|
||||
r"""Search the symbols matching ``mask`` (``Windbg`` like).
|
||||
|
||||
:return: [:class:`SymbolInfo`] -- A list of :class:`SymbolInfo`
|
||||
|
||||
|
||||
@@ -626,7 +626,7 @@ class VirtualProtected(object):
|
||||
|
||||
|
||||
class DisableWow64FsRedirection(object):
|
||||
"""
|
||||
r"""
|
||||
A context manager that disable the SysWow64 Filesystem Redirection ::
|
||||
|
||||
if is_process_32_bits:
|
||||
|
||||
@@ -166,13 +166,13 @@ class KernelObject(object):
|
||||
raise KeyError("Could not find WinObject <{0}> under <{1}>".format(name, self.fullname))
|
||||
|
||||
def __getitem__(self, name):
|
||||
"""Query object ``name`` from the directory, split and subquery on ``\\``::
|
||||
r"""Query object ``name`` from the directory, split and subquery on ``\``::
|
||||
|
||||
>>> obj
|
||||
<KernelObject "\Windows" (type="Directory")>
|
||||
>>> obj["WindowStations"]["WinSta0"]
|
||||
<KernelObject "\Windows\WindowStations" (type="Directory")>
|
||||
>>> obj["WindowStations\\WinSta0"]
|
||||
>>> obj[r"WindowStations\\WinSta0"]
|
||||
<KernelObject "\Windows\WindowStations" (type="Directory")>
|
||||
|
||||
:rtype: :class:`KernelObject`
|
||||
|
||||
@@ -87,7 +87,7 @@ class System(object):
|
||||
|
||||
@property
|
||||
def logicaldrives(self):
|
||||
"""List of logical drives [C:\, ...]
|
||||
"""List of logical drives [C:\\, ...]
|
||||
|
||||
:type: [:class:`~windows.winobject.volume.LogicalDrive`] -- A list of LogicalDrive
|
||||
"""
|
||||
@@ -621,7 +621,7 @@ class System(object):
|
||||
|
||||
@staticmethod
|
||||
def enumerate_threads():
|
||||
return [WinThread._from_THREADENTRY32(th) for th in System.enumerate_threads_generator()]
|
||||
return [process.WinThread._from_THREADENTRY32(th) for th in System.enumerate_threads_generator()]
|
||||
|
||||
|
||||
def enumerate_threads_setup_owners(self):
|
||||
|
||||
@@ -474,11 +474,11 @@ class WmiNamespace(gdef.IWbemServices, WmiComInterface):
|
||||
return """<{0} "{1}"{2}>""".format(type(self).__name__, self.name, null)
|
||||
|
||||
class WmiManager(dict):
|
||||
"""The main WMI class exposed, used to list and access differents WMI namespace, can be used as a dict to access
|
||||
r"""The main WMI class exposed, used to list and access differents WMI namespace, can be used as a dict to access
|
||||
:class:`WmiNamespace` by name
|
||||
|
||||
Example:
|
||||
>>> windows.system.wmi["root\\SecurityCenter2"]
|
||||
>>> windows.system.wmi[r"root\SecurityCenter2"]
|
||||
<WmiNamespace "root\SecurityCenter2">
|
||||
"""
|
||||
DEFAULT_NAMESPACE = "root\\cimv2" #: The default namespace for :func:`select` & :func:`query`
|
||||
|
||||
Reference in New Issue
Block a user