low.actions
900+ HWP action wrappers.
actions._Actions
low.actions._Actions(app)Dynamic action dispatcher with instance caching.
Actions are resolved via getattr using the _action_info dict. Resolved _Action instances are cached so repeated access does not trigger repeated COM calls.
Usage: app.actions.CharShape # cached _Action app.actions.get_pset_class(β¦) # introspect without COM app.actions.refresh() # clear cache βCharShapeβ in app.actions # membership test
Methods
| Name | Description |
|---|---|
| get_description | Get action description without creating _Action. |
| get_pset_class | Get the ParameterSet class for an action WITHOUT creating _Action. |
| list_actions | List all available action names. |
| refresh | Invalidate cache; next access creates fresh _Action with HWP defaults. |
get_description
low.actions._Actions.get_description(action_name)Get action description without creating _Action.
get_pset_class
low.actions._Actions.get_pset_class(action_name)Get the ParameterSet class for an action WITHOUT creating _Action.
This is a cheap introspection β no COM calls.
Returns: ParameterSet subclass, or None if the action has no pset.
Raises: KeyError: if action_name is unknown.
list_actions
low.actions._Actions.list_actions(with_pset_only=False)List all available action names.
Args: with_pset_only: if True, return only actions that have a ParameterSet.
refresh
low.actions._Actions.refresh(name=None)Invalidate cache; next access creates fresh _Action with HWP defaults.
Args: name: action name to refresh. None clears entire cache.
actions._Action
low.actions._Action(app, action_key)νκΈ Action ν΄λμ€. app.api.CreateAction() λ‘ μμ±λλ HWP μ‘μ
μ κ°μΌ μμ λνΌ.
λ¬Έμ λ°μΈλ© κ·μΉ (v0.0.4+): CreateAction() μ νΈμΆ μμ μ νμ± λ¬Έμ μ λ°μΈλ©λ action μ λ°νν©λλ€. κ³Όκ±°μλ __init__ μμ ν λ²λ§ νΈμΆνκΈ° λλ¬Έμ μ΄ν λ€λ₯Έ λ¬Έμλ‘ μ νν΄λ action μ΄ μλ λ¬Έμμ κ³μ writes νλ λ²κ·Έκ° μμμ΅λλ€.
μ΄μ λ act μ pset μ νμ± λ¬Έμ ID λ³λ‘ lazy-cache ν©λλ€. λμΌ λ¬Έμμμλ μΊμ ννΈ, λ€λ₯Έ λ¬Έμλ‘ μ ννλ©΄ μλμΌλ‘ μ action μ μμ±ν©λλ€. Public API λ κΈ°μ‘΄κ³Ό λμΌν©λλ€.
Attributes
| Name | Description |
|---|---|
| act | νμ¬ νμ± λ¬Έμμ λ°μΈλ©λ IXHwpAction. |
| pset | νμ¬ νμ± λ¬Έμμ λ°μΈλ©λ wrapped ParameterSet. |
Methods
| Name | Description |
|---|---|
| get_pset | Return ParameterSet bound to global HParameterSet node (HAction pattern). |
| run | Execute the action using pset-based approach. |
get_pset
low.actions._Action.get_pset()Return ParameterSet bound to global HParameterSet node (HAction pattern).
This is the βHActionβ style described in HWP Automation docs (p.60): HAction.GetDefault(actname, HParameterSet.HXxx.HSet) HParameterSet.HXxx.
The returned ParameterSet shares state with the global HParameterSet, unlike .pset which uses a local pset from CreateSet().
run
low.actions._Action.run(parameterset=None)Execute the action using pset-based approach. Direct execution with pset objects without HSet synchronization.