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) and Windows 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
Get a window
from display_server_interactions import DSI
dsi = 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
Close
Hashes for display-server-interactions-0.0.dev5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | faf60e105ae70808656cab3d63a7f156a11c36a633e446b28e81f93eba38b17a |
|
MD5 | b4f6b5f09d89cf6edfff8ffdec1c1060 |
|
BLAKE2b-256 | 137ec46107944be19a9605a8cd19f401c31a837f38d62bcbafd0e1914325d7c8 |