How zackaryw/pyldplayer2 works
Project type and purpose
• This is a Python library and CLI tool (“pyldplayer2”) for automating and managing LDPlayer emulator instances.
• It exposes a programmatic API (Console, BatchConsole, Query classes) and command-line interfaces (ldplay, reldplay).
• It also handles LDPlayer configuration files (LeidianFile, RecordFile, SMPFile, KMPFile).
File structure
• Top-level: src/pyldplayer2/ contains three main packages:
• base/ – core domain models, enums, objects, utilities
• coms/ – communication layer: console control, file readers/writers, CLI commands
• utils/ – discovery routines, window layout helpers
• Root files: pyproject.toml, requirements*.lock, GitHub Actions workflow for publishing.
• Tests in tests/ validate communication and file handling.
• No separate “frontend” or “backend,” but the CLI acts as the “user interface” and coms+base form the “service layer.”
README for additional insights
• Core features: console management, file operations, instance querying, CLI tools.
• Optional install extras group features by capability: shell, discover, auto, wnd.
• Usage examples show the flow: discover() → instantiate Console → launch()/quit(), or batch methods.