Skip to main content

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


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.2.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymx-1.2.0-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file pymx-1.2.0.tar.gz.

File metadata

  • Download URL: pymx-1.2.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pymx-1.2.0.tar.gz
Algorithm Hash digest
SHA256 c4a5832b3a6dba1d27884b3765219904d0d08b38848894166de45096b62e92d0
MD5 29ac82ff1f6d9e00cf45d484a8df1ef8
BLAKE2b-256 be3980f1e31001caee6a572791958c70bf2f1708ae9802ea55ee2992199f1f47

See more details on using hashes here.

File details

Details for the file pymx-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pymx-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pymx-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74f325bf11c1ae9ae9ed531845b86dce496200191ef1676f711639a3e8f2b628
MD5 3cbad8b829e1a8b95038700442d9aa03
BLAKE2b-256 7a9095832ba32c4696df103f311a7484b0524cd685d5950e2a17d83f0cc93a19

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page