some module
Project description
module
Some module for python
Installation
pip install module-thw
Example
Window
import subprocess
import module
import time
p1 = subprocess.Popen("C:\\WINDOWS\\system32\\notepad.exe")
p2 = subprocess.Popen("C:\\WINDOWS\\system32\\notepad.exe")
time.sleep(.1)
lst_note1 = module.Window.from_pid(p1.pid)
lst_note2 = module.Window.from_pid(p2.pid)
print(lst_note1)
print(lst_note2)
for note1 in lst_note1:
if note1.is_visible():
for note2 in lst_note2:
note2.position = (0, 0)
note2.size = (500, 300)
note1.attachments(note2)
break
Path
convert to EXE to see the different.
import module
path = module.Path(__file__)
print(path.source)
print(path.source.join("test"))
print(path.app)
ThreadList
list using to get each element from multi thead
import threading
import module
lst = module.ThreadList([1, 2, 3, 4, 5])
def thread(index):
i = lst.next()
while i is not None:
print("Thread", index, "-", i)
i = lst.next()
threading.Thread(target=thread, args=(0, )).start()
threading.Thread(target=thread, args=(1, )).start()
threading.Thread(target=thread, args=(2, )).start()
hide_console
Hide console of application. It isn't like --noconsole in pyinstaller
import module
module.hide_console()
alert_excepthook
Will have a message box about exceptions, not only on the console
import module
module.alert_excepthook()
a = 1 / 0
alert
a window message box, return button clicked
import module
button = module.alert("this is a title", "this is a message", module.TypesButtons.OK_CANCEL)
print(button == module.Buttons.OK)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file module-Thw-0.0.6.tar.gz.
File metadata
- Download URL: module-Thw-0.0.6.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.3 tqdm/4.62.2 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2c9b3f359561a0b3be40f60cd8eee790e697a93e854aa12d2ab7ec79680795b
|
|
| MD5 |
1fbc9a4712d0f5854187131435e0921f
|
|
| BLAKE2b-256 |
a5b768b8f050e6efa1e638ba57543e4d7fa4b2878e5c0b6b7aaa423cc7a89b1f
|
File details
Details for the file module_Thw-0.0.6-py3-none-any.whl.
File metadata
- Download URL: module_Thw-0.0.6-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.3 tqdm/4.62.2 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
404ff066f3bc488116b731263810dec6bf4f1deeb6c1a78dcde3e80cf68e77fb
|
|
| MD5 |
19275e7ed72804906a94f73fb815ae60
|
|
| BLAKE2b-256 |
53c7455fae0ed4231b585c25ef91cebf849e04fb83d14493484298eff05ea2be
|