see https://github.com/ZackaryW/pyldplayer
this module provides all the necessary interfaces to interact with LDPlayer app
NOTE: since v2.0, the module will not contain any automation functionalities, you should refer to autoldplayer
module instead
pip install pyldplayer
from pyldplayer.console import Console
from pyldplayer.process import DefaultProcess
from pyldplayer.windows import WindowMgr
x = DefaultProcess("{path}")
w = Console(x)
k = w.list2()
# launch in root mode
k[0].modify(root=True)
k[0].launch()
k[0].refresh()
- communicates directly with the LDConsole.exe cli using
process.BaseProcess
this is the only way to interact with the app through command line interfaces
process.BaseProcess
is implemented on top ofprocess.BaseProcessInterface
and integratedprocess.ProcessVerifier
process.CachedProcess
is both an example of extending features to theprocess.BaseProcess
and a way to cache executed commandsprocess.ProcessVerifier
checks if the path is valid
Console
provides all CLI APIsConsole.list2
returns a list ofConsoleInstance
objects
ConfigMgr
andKmpMgr
provide access toconfig
andkmp
files, as well as loading them into pydantic modelsLeidianCfg
for instanced configLeidiansCfg
for host config
- Provides
pygetwindow
related functions
This allows the following
- window orientation
WindowMgr.orientation
- window resizing
WindowMgr.resize
- contains extended and optional implementations
pyautogui
is needed for some features
pygetwindow
screeninfo
pydantic