DSI allows you to perform basic interactions on your display server, like screenshotting a window or sending input to it.
Project description
Display Server Interactions
DSI allows you to perform basic interactions on your display server, like screenshotting a window or sending input to it. Currently, DSI only supports X11/Xorg (GNU/Linux) but it aims to be cross-platform.
WARNING: Please Do not use DSI in production, because it's currently in development!
Quick overview
Look at the documentation for moor information's
Get a window
from display_server_interactions import DSI
window = DSI.get_active_window()
Get basic window information
print("Active window: ")
print("\tName: {}".format(window.name))
print("\tPID: {}".format(window.pid))
Take a screenshot of the window
import cv2
import numpy as np
img = np.array(window.get_image())
cv2.imshow(f'Screenshot of "{window.name}"', img)
while True:
if cv2.waitKey(1) & 0xFF == ord('q'):
break
Sending keys to a window
window.send_str("Hello World")
Sending mouse clicks
window.send_mouse_click(100, 100)
Move the mouse pointer
window.warp_pointer(x=100, y=100)
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for display-server-interactions-0.0.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e154ab2a064e90d230374484b120d7d8da5b543c146da5245f7de921984352dc |
|
MD5 | af96f7522f0381c482262f96df07ed46 |
|
BLAKE2b-256 | 265de0798015220c2c3b4b77409504eddd000121249056efea9ff45ae870147c |
Close
Hashes for display_server_interactions-0.0.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38452300539aaf0691cfb25c7d8b6db68dec8cc319d596a092a019193d04bd3f |
|
MD5 | 3d63252db6107f784e5546b393883629 |
|
BLAKE2b-256 | 89d67ed108c1f35e72ec3522b8243558e29b379fee9321023f9cda0699317c35 |