Updates for Documentation
This commit is contained in:
@@ -108,6 +108,19 @@ Changing the PLC program only requires updating `LinkPath` and `LinkData`.
|
||||
|
||||
## Scripting
|
||||
|
||||
### Jython 2.7 Constraints
|
||||
|
||||
All scripts in `ignition/project/` run Jython 2.7. Violating these causes runtime errors:
|
||||
|
||||
- NO f-strings → use `"text {}".format(val)` or `"text %s" % val`
|
||||
- NO walrus operator `:=`
|
||||
- NO `pathlib` → use `os.path`
|
||||
- NO type hints → no `def foo(x: int) -> str:`
|
||||
- NO `dataclasses`, `enum.auto()`, `asyncio`
|
||||
- NO dictionary unpacking `{**d1, **d2}` → use `d1.update(d2)`
|
||||
- NO `yield from` → use explicit loops
|
||||
- Imports: `system.*` for Ignition API, standard Java/Jython libs only
|
||||
|
||||
### Project Library Scripts (`script-python/`)
|
||||
|
||||
Jython 2.7 — see root CLAUDE.md for language constraints.
|
||||
|
||||
Reference in New Issue
Block a user