A mendix extension library implement mcp server.
Project description
def PostMessage(name, msg):
print(msg)
# 导入
from mxpy.context import activeDocument
# 定义回调函数
def callback(event):
PostMessage("python:exe", event)
# 读取
content = activeDocument.content
# 写入测试
activeDocument.content = "旧内容"
PostMessage("python:exe", activeDocument.content)
# 监听变更测试
activeDocument.content = "监听前的内容"
activeDocument.add_listener(callback) # 添加监听器
activeDocument.content = "监听后的内容" # 这里会触发 callback
activeDocument.remove_listener(callback) # 移除监听器
activeDocument.content = "移除监听后的内容" # 这里不会触发 callback
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymx-1.0.0.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pymx-1.0.0-py3-none-any.whl
(11.8 kB
view details)
File details
Details for the file pymx-1.0.0.tar.gz.
File metadata
- Download URL: pymx-1.0.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10880e0132ec4db727fe521ebbed312ce38848be111091c914190ead1deb6739
|
|
| MD5 |
833f73b00f48e315c54dace21656abbf
|
|
| BLAKE2b-256 |
ba1d7ff79eb41d7b77d275f2432106d2683b96ffe592979e722c5230402a89c0
|
File details
Details for the file pymx-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pymx-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34110bdabdd2d8941fc50d40b7b4914ba87714a975c2a4c9895a77dc8f3e1f18
|
|
| MD5 |
2a7b05b4696708b19da1a1a845a4f386
|
|
| BLAKE2b-256 |
13eda046479f8eea012013b0f69435ab4c2051dcd65721703212bf8190347b2d
|