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")
Move the mouse pointer
window.warp_pointer(x=42, y=73)
Sending mouse clicks
window.send_mouse_click(x=42, y=73)
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.dev2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8cb3059f340fbc922f2dabcc380732a41bf9c29c01d80a13f73a537ae3a4255 |
|
MD5 | f5ddf2f7e1d8d8e4b7a1fb41109fac64 |
|
BLAKE2b-256 | 9e41ab29625b09e0e9673dadadcf2af93c9443fd03b88ce32dfbcac1059d8ede |
Close
Hashes for display_server_interactions-0.0.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dddfd6a2b6b170611da877b5a6ee2e27d07bfc60869e2af4617c2c922f89dbf5 |
|
MD5 | db42a79f7b73dd83dfbd04623d197008 |
|
BLAKE2b-256 | 08a405714e8468c6f046c90b09b85cf3ec3ec6e34a5f0daaac9e34052c9a43f3 |