Command plugin for Plover to run an arbitrary Python command.
Project description
plover-run-py
Command plugin for Plover to run an arbitrary Python command.
See also:
plover-run-shell
plugin for running a shell command.plover-debugging-console
plugin for running Python commands in Plover in a shell (more convenient for debugging and showing results).plover-retro-stringop
plugin for running Python commands to transform/modify the previous text using arbitrary Python expression.
Usage
In order to use this plugin in Plover you need to create a dictionary entry of the form:
{
"example_stroke": "{PLOVER:PY:command}"
}
Variables engine
and plover
are provided.
Remember to escape the characters in \{}
according to Plover's dictionary format.
Alternatively, if the definition has the form "{PLOVER:PY_F:path}"
, the command
Note: If the command takes a long time to finish, Plover might freeze.
Example
Refer to the API reference (1, 2) (unofficial, community-maintained) for more details.
-
Sleep between key presses:
{#a}{plover:py:import time; time.sleep(1)}{#b}
-
Toggle a plugin and show a warning notification on the status: (broken into multiple lines for readability)
{plover:py: engine["enabled_extensions"]^=\{'ibus'\}; plover.log.warning('ibus enabled=' + str('ibus' in engine["enabled_extensions"])) }
Project details
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
Hashes for plover_run_py-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7abf81691e9c3d3d292143540ddba59c8b75c7309a56ce9a37a03daf45b47b9b |
|
MD5 | 2b1d16e0054e3b7fb78a5547fc5e6b1c |
|
BLAKE2b-256 | c6b137cb20e12700e51bf829c595f63f4ef085ce9d141cd0025f8f19e9bf7f4d |