PyMemoryEditor 1.4.11__tar.gz → 1.4.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PKG-INFO +1 -1
  2. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/__init__.py +1 -1
  3. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/open_process.py +5 -1
  4. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/process/util.py +4 -4
  5. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor.egg-info/PKG-INFO +1 -1
  6. PyMemoryEditor-1.4.12/PyMemoryEditor.egg-info/requires.txt +1 -0
  7. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/setup.py +1 -1
  8. PyMemoryEditor-1.4.11/PyMemoryEditor.egg-info/requires.txt +0 -2
  9. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/LICENSE +0 -0
  10. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/process/__init__.py +0 -0
  11. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/process/errors.py +0 -0
  12. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/enums/__init__.py +0 -0
  13. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/enums/memory_allocation_states.py +0 -0
  14. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/enums/memory_protections.py +0 -0
  15. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/enums/memory_types.py +0 -0
  16. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/enums/process_operations.py +0 -0
  17. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/enums/scan_types.py +0 -0
  18. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/enums/standard_access_rights.py +0 -0
  19. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/functions.py +0 -0
  20. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/types.py +0 -0
  21. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor/win32/util.py +0 -0
  22. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor.egg-info/SOURCES.txt +0 -0
  23. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor.egg-info/dependency_links.txt +0 -0
  24. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/PyMemoryEditor.egg-info/top_level.txt +0 -0
  25. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/README.md +0 -0
  26. {PyMemoryEditor-1.4.11 → PyMemoryEditor-1.4.12}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyMemoryEditor
3
- Version: 1.4.11
3
+ Version: 1.4.12
4
4
  Summary: A Python library to edit and track memory of Windows processes (32 bits and 64 bits).
5
5
  Home-page: https://github.com/JeanExtreme002/PyMemoryEditor
6
6
  Author: Jean Loui Bernard Silva de Jesus
@@ -6,7 +6,7 @@ reading and writing values in the process memory.
6
6
  """
7
7
 
8
8
  __author__ = "Jean Loui Bernard Silva de Jesus"
9
- __version__ = "1.4.11"
9
+ __version__ = "1.4.12"
10
10
 
11
11
  import sys
12
12
 
@@ -63,7 +63,11 @@ class OpenProcess(object):
63
63
  # Get the process handle.
64
64
  self.__process_handle = GetProcessHandle(self.__permission.value, False, self.__process.pid)
65
65
 
66
- def close(self):
66
+ @property
67
+ def pid(self) -> int:
68
+ return self.__process.pid
69
+
70
+ def close(self) -> int:
67
71
  """
68
72
  Close the process handle.
69
73
  """
@@ -1,7 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
- from win32.win32gui import FindWindow
4
- from win32.win32process import GetWindowThreadProcessId
3
+ from ..win32.functions import GetProcessIdByWindowTitle
5
4
  import psutil
6
5
 
7
6
 
@@ -13,12 +12,13 @@ def get_process_id_by_process_name(process_name: str) -> int:
13
12
  if process.name() == process_name:
14
13
  return process.pid
15
14
 
15
+
16
16
  def get_process_id_by_window_title(window_title: str) -> int:
17
17
  """
18
18
  Get a window title and return its process ID.
19
19
  """
20
- hwnd = FindWindow(None, window_title)
21
- return GetWindowThreadProcessId(hwnd)[1] if hwnd else 0
20
+ return GetProcessIdByWindowTitle(window_title)
21
+
22
22
 
23
23
  def pid_exists(pid: int) -> bool:
24
24
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyMemoryEditor
3
- Version: 1.4.11
3
+ Version: 1.4.12
4
4
  Summary: A Python library to edit and track memory of Windows processes (32 bits and 64 bits).
5
5
  Home-page: https://github.com/JeanExtreme002/PyMemoryEditor
6
6
  Author: Jean Loui Bernard Silva de Jesus
@@ -22,7 +22,7 @@ setup(
22
22
  "PyMemoryEditor.win32",
23
23
  "PyMemoryEditor.win32.enums"
24
24
  ],
25
- install_requires = ["pywin32", "psutil"],
25
+ install_requires = ["psutil",],
26
26
  classifiers = [
27
27
  "License :: OSI Approved :: MIT License",
28
28
  "Intended Audience :: Developers",
@@ -1,2 +0,0 @@
1
- pywin32
2
- psutil
File without changes