Skip to main content

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)
note1 = module.Window.from_pid(p1.pid)
note2 = module.Window.from_pid(p2.pid)
print(note1)
print(note2)
if note1 and note2:
    note2.position = (0, 0)
    note2.size = (500, 300)
    note1.size = (600, 600)
    note1.attack_child(note2)

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()

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

module-Thw-0.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

module_Thw-0.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file module-Thw-0.0.2.tar.gz.

File metadata

  • Download URL: module-Thw-0.0.2.tar.gz
  • Upload date:
  • Size: 4.7 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

Hashes for module-Thw-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f35ec0be7672b70f635826be17339c369da64af1d8812504bcecee93e8626491
MD5 e6387766789fc2d44e169a465aa6fad8
BLAKE2b-256 42b2d61243c2fe8fef15d258e7508739b050e34bb394c8acc0f19ba9477d507d

See more details on using hashes here.

File details

Details for the file module_Thw-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: module_Thw-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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

Hashes for module_Thw-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 02d23e15ffb40c4008e80dfa93104832fc89606c76c7e2ae76d2e81c1f707235
MD5 b835c72018155ebd89eda7133d17e9bf
BLAKE2b-256 0bd67f196986b52ec5890aa83696c7bbda82531ce17f810ab22e553df000b318

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page